OAuth2

OAuth2 autenticator

Constructors

this
this(UserCollection userCollection, OAuth2Configuration configuration)

Members

Functions

mandatoryAuth
void mandatoryAuth(HTTPServerRequest req, HTTPServerResponse res)
Undocumented in source. Be warned that the author may not have intended to support it.
mandatoryAuth
AuthResult mandatoryAuth(HTTPServerRequest req)

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)
Undocumented in source. Be warned that the author may not have intended to support it.
permisiveAuth
AuthResult permisiveAuth(HTTPServerRequest req)

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

respondInvalidToken
void respondInvalidToken(HTTPServerResponse res)
Undocumented in source. Be warned that the author may not have intended to support it.
respondUnauthorized
void respondUnauthorized(HTTPServerResponse res)
Undocumented in source. Be warned that the author may not have intended to support it.
tokenHandlers
void tokenHandlers(HTTPServerRequest req, HTTPServerResponse res)

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

Variables

configuration
OAuth2Configuration configuration;
Undocumented in source.

Inherited Members

From BaseAuth

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

mandatoryAuth
AuthResult mandatoryAuth(HTTPServerRequest req)

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
AuthResult permisiveAuth(HTTPServerRequest req)

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

respondUnauthorized
void respondUnauthorized(HTTPServerResponse res)

Set the response code and message to notify the client that it does not have rights to make the request

respondInvalidToken
void respondInvalidToken(HTTPServerResponse res)

Set the response code and message to notify the client that there were a problem with the request

Meta