diamond.authentication.auth

Copyright © DiamondMVC 2018

Members

Functions

getAuthCookie
string getAuthCookie(HttpClient client)

Gets the auth cookie from a client.

hasAuthCookie
bool hasAuthCookie(HttpClient client)

Checks whether the client has the auth cookie or not.

initializeAuth
void initializeAuth()

Static constructor for the module.

login
void login(HttpClient client, long loginTime, Role role)

Logs the user in.

logout
void logout(HttpClient client)

Logs the user out.

setTokenInvalidator
void setTokenInvalidator(void function(string, HttpClient) invalidator)
void setTokenInvalidator(void delegate(string, HttpClient) invalidator)

Sets the token invalidator.

setTokenSetter
void setTokenSetter(string function(HttpClient) setter)
void setTokenSetter(string delegate(HttpClient) setter)

Sets the token setter.

setTokenValidator
void setTokenValidator(Role function(string, HttpClient) validator)
void setTokenValidator(Role delegate(string, HttpClient) validator)

Sets the token validator.

validateAuthentication
void validateAuthentication(HttpClient client)

Validates the authentication. This also sets the role etc.

Meta

Authors

Jacob Jensen (bausshf)