class AuthenticationContext
Represents an authentication context for the call
call
- instance of ApplicationCall this context is for
AuthenticationContext(call: ApplicationCall)
Represents an authentication context for the call |
val allErrors: List<Error>
All registered errors during auth procedure (only AuthenticationFailedCause.Error). |
|
val allFailures: List<AuthenticationFailedCause>
All authentication failures during auth procedure including missing or invalid credentials |
|
val call: ApplicationCall
instance of ApplicationCall this context is for |
|
val challenge: AuthenticationProcedureChallenge
Gets an AuthenticationProcedureChallenge for this context |
|
val
Stores authentication failures for keys provided by authentication mechanisms |
|
var principal: Principal?
Retrieves authenticated principal, or returns null if no user was authenticated |
fun challenge(key: Any, cause: AuthenticationFailedCause, function: <ERROR CLASS><AuthenticationProcedureChallenge, ApplicationCall>): Unit
Requests a challenge to be sent to the client if none of mechanisms can authenticate a user |
|
fun error(key: Any, cause: AuthenticationFailedCause): Unit
Appends an error to the errors list. Overwrites if already registered for the same key. |
|
fun principal(principal: Principal): Unit
Sets an authenticated principal for this context. fun <T : Principal> principal(): T?
Retrieves a principal of type T, if any |