Creates a new instance of an AuthCodeController.
An AuthCodeController requires an AuthServer to carry out tasks.
By default, an AuthCodeController has only one acceptedContentTypes - 'application/x-www-form-urlencoded'.
In order to display a login page, renderAuthorizationPageHTML
must be provided. This method must return a full HTML
document that will POST to this same endpoint when a 'Login' button is pressed. This method must provide
the username and password the user enters, as well as the queryParameters as part of the form data to this endpoint's POST.
The requestURI of this method is the full request URI of this endpoint. See the RequestSink subclass in example/templates/default
or in a project generated with aqueduct create
for an example.
Source
AuthCodeController(this.authServer, {Future<String> renderAuthorizationPageHTML(AuthCodeController controller, Uri requestURI, Map<String, String> queryParameters)}) { acceptedContentTypes = [ new ContentType("application", "x-www-form-urlencoded") ]; _renderFunction = renderAuthorizationPageHTML; }