ktor-auth / io.ktor.auth / OAuthServerSettings / OAuth2ServerSettings

OAuth2ServerSettings

class OAuth2ServerSettings : OAuthServerSettings

OAuth2 server settings

Constructors

<init>

OAuth2ServerSettings(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)OAuth2ServerSettings(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, accessTokenInterceptor: HttpRequestBuilder.() -> Unit = {})

OAuth2 server settings

Properties

accessTokenInterceptor

val accessTokenInterceptor: HttpRequestBuilder.() -> Unit

an interceptor function to customize access token request

accessTokenRequiresBasicAuth

val accessTokenRequiresBasicAuth: Boolean

to send BASIC auth header when an access token is requested

accessTokenUrl

val accessTokenUrl: String

OAuth server access token request URL

authorizeUrl

val authorizeUrl: String

OAuth server authorization page URL

authorizeUrlInterceptor

val authorizeUrlInterceptor: URLBuilder.() -> Unit

an interceptor function to customize authorization URL

clientId

val clientId: String

client id parameter (provided by OAuth server vendor)

clientSecret

val clientSecret: String

client secret parameter (provided by OAuth server vendor)

defaultScopes

val defaultScopes: List<String>

OAuth scopes used by default

nonceManager

val nonceManager: NonceManager

to be used to produce and verify nonce values

passParamsInURL

val passParamsInURL: Boolean

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

requestMethod

val requestMethod: HttpMethod

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

Inherited Properties

name

val name: String

configuration name

version

val version: OAuthVersion

OAuth version (1a or 2)