Package io.ktor.auth
Types
Predicate function that accepts an application call and returns true
or false
Authentication feature supports pluggable mechanisms for checking and challenging a client to provide credentials
Represents an authentication context for the call
Represents a cause for authentication challenge request
Authentication function that accepts and verifies credentials and returns a principal when verification successful.
Represents authentication Pipeline for checking and requesting authentication
Represents authentication challenging procedure requested by authentication mechanism
Represents an authentication provider with the given name
An authentication route node that is used by Authentication feature and usually created by Route.authenticate DSL function so generally there is no need to instantiate it directly unless you are writing an extension
Represents a Basic authentication provider
Marker interface indicating that a class represents credentials for authentication
The default state provider that does generate random nonce and don't keep them
Represents a Digest authentication provider
Provides message digest for the specified username and realm or returns null
if the user is missing. This function could fetch digest from a database or compute it instead.
Response content with 403 Forbidden
status code and WWW-Authenticate
header of supplied challenges
Specifies what to send back if form authentication fails.
Specifies what to send back if form authentication fails.
Represents a form-based authentication provider
Represents an OAuth1a server error
Represents a error during communicating to OAuth2 server
List of OAuth2 request parameters for both peers
List of OAuth2 server response parameters
Provides states for OAuth2. State could be just a random number (nonce) or could contain additional form fields or a signature. It is important that it should be a way to verify state. So all states need to be saved somehow or a state need to be a signed set of parameters that could be verified later
OAuth access token acquired from the server
Represents an OAuth provider for Authentication feature
OAauth callback parameters
OAuth grant types constants
Represents OAuth server settings
OAuth versions used in configuration
Specifies what to send back if authentication fails.
Specifies what to send back if session authentication fails.
Represents a session-based authentication provider
Response content with 401 Unauthorized
status code and WWW-Authenticate
header of supplied challenges
Represents a simple user's principal identified by name
Functions
Creates an authentication route that does handle authentication by the specified providers referred by configurations names. null
could be used to point to the default provider and could be also mixed with other provider names. Other routes, handlers and interceptors could be nested into this node
Installs Authentication feature if not yet installed and invokes block on it's config. One is allowed to modify existing authentication configuration only in authentication's block or via Authentication.configure function. Changing captured instance of configuration outside of block may have no effect or damage application's state.
Installs Basic Authentication mechanism
Retrieves Basic authentication credentials for this ApplicationRequest
Create an HTTP auth header for OAuth1a obtain token request
Create an HTTP auth header for OAuth1a upgrade token request
Installs Digest Authentication mechanism
Retrieves DigestCredential from this call
Calculates expected digest bytes for this DigestCredential
Installs Form Authentication mechanism
Installs OAuth Authentication mechanism
Install both OAuth1a and OAuth2 authentication helpers that do redirect to OAuth server authorization page and handle corresponding callbacks
Handle OAuth callback. Usually it leads to requesting an access token.
Handle OAuth callback.
Respond OAuth redirect
Parses an authorization header from a ApplicationRequest returning a HttpAuthHeader.
Provides ability to authenticate users via sessions. It only works if T session type denotes Principal as well otherwise use full session with lambda function with SessionAuthenticationProvider.Configuration.validate configuration
Provides ability to authenticate users via sessions. It is important to have specified SessionAuthenticationProvider.Configuration.validate and SessionAuthenticationProvider.Configuration.challenge in the lambda to get it work property
Sign an HTTP auth header
Build an OAuth1a signature base string as per RFC
Converts HttpAuthHeader to DigestCredential
Verifies credentials are valid for given method and digester and userNameRealmPasswordDigest
Implements Resource Owner Password Credentials Grant see http://tools.ietf.org/html/rfc6749#section-4.3