OAuth2

OAuth2 autenticator

Constructors

this
this(UserCollection userCollection, ClientCollection clientCollection, OAuth2Configuration configuration)

Members

Functions

mandatoryAuth
void mandatoryAuth(HTTPServerRequest req, HTTPServerResponse res)

Auth handler that will fail if a successfull auth was not performed. This handler is usefull for routes that want to hide information to the public.

permisiveAuth
void permisiveAuth(HTTPServerRequest req, HTTPServerResponse res)

Auth handler that fails only if the auth fields are present and are not valid. This handler is usefull when a route should return different data when the user is logged in

tokenHandlers
void tokenHandlers(HTTPServerRequest req, HTTPServerResponse res)

Handle the OAuth requests. Handles token creation, authorization authentication and revocation

Variables

clientCollection
ClientCollection clientCollection;
Undocumented in source.
configuration
OAuth2Configuration configuration;
Undocumented in source.

Inherited Members

From BaseAuthRouter

collection
UserCollection collection;
Undocumented in source.
mandatoryAuth
void mandatoryAuth(HTTPServerRequest req, HTTPServerResponse res)

Auth handler that will fail if a successfull auth was not performed. This handler is usefull for routes that want to hide information to the public.

permisiveAuth
void permisiveAuth(HTTPServerRequest req, HTTPServerResponse res)

Auth handler that fails only if the auth fields are present and are not valid. This handler is usefull when a route should return different data when the user is logged in

Meta