OAuth2ServerSettings

class OAuth2ServerSettings(val name: String, val authorizeUrl: String, val accessTokenUrl: String, val requestMethod: HttpMethod = HttpMethod.Get, val clientId: String, val clientSecret: String, val defaultScopes: List<String> = emptyList(), val accessTokenRequiresBasicAuth: Boolean = false, val nonceManager: NonceManager = GenerateOnlyNonceManager, val authorizeUrlInterceptor: URLBuilder.() -> Unit = {}, val passParamsInURL: Boolean = false, val extraAuthParameters: List<Pair<String, String>> = emptyList(), val extraTokenParameters: List<Pair<String, String>> = emptyList(), val accessTokenInterceptor: HttpRequestBuilder.() -> Unit = {}, val onStateCreated: suspend (call: ApplicationCall, state: String) -> Unit = { _, _ -> }) : OAuthServerSettings

OAuth2 server settings

Constructors

Link copied to clipboard
constructor(name: String, authorizeUrl: String, accessTokenUrl: String, requestMethod: HttpMethod = HttpMethod.Get, clientId: String, clientSecret: String, defaultScopes: List<String> = emptyList(), accessTokenRequiresBasicAuth: Boolean = false, nonceManager: NonceManager = GenerateOnlyNonceManager, authorizeUrlInterceptor: URLBuilder.() -> Unit = {}, passParamsInURL: Boolean = false, extraAuthParameters: List<Pair<String, String>> = emptyList(), extraTokenParameters: List<Pair<String, String>> = emptyList(), accessTokenInterceptor: HttpRequestBuilder.() -> Unit = {}, onStateCreated: suspend (call: ApplicationCall, state: String) -> Unit = { _, _ -> })

Properties

Link copied to clipboard

an interceptor function to customize access token request

Link copied to clipboard

to send BASIC auth header when an access token is requested

Link copied to clipboard

OAuth server access token request URL

Link copied to clipboard

OAuth server authorization page URL

Link copied to clipboard

an interceptor function to customize authorization URL

Link copied to clipboard

client id parameter (provided by OAuth server vendor)

Link copied to clipboard

client secret parameter (provided by OAuth server vendor)

Link copied to clipboard

OAuth scopes used by default

Link copied to clipboard

extra parameters to send during authentication

Link copied to clipboard

extra parameters to send with getting access token call

Link copied to clipboard

configuration name

Link copied to clipboard

to be used to produce and verify nonce values

Link copied to clipboard
val onStateCreated: suspend (call: ApplicationCall, state: String) -> Unit
Link copied to clipboard

whether to pass request parameters in POST requests in URL instead of body.

Link copied to clipboard

HTTP request method to be used to acquire access token (see vendors documentation)

Link copied to clipboard

OAuth version (1a or 2)