api

http4k / org.http4k.security / OAuthProvider

OAuthProvider

class OAuthProvider (source)

Provides a configured set of objects for use with an OAuth2 provider.

Constructors

Name Summary
<init> OAuthProvider(providerConfig: OAuthProviderConfig, client: HttpHandler, callbackUri: Uri, scopes: List<String>, oAuthPersistence: OAuthPersistence, modifyAuthState: (Uri) -> Uri = { it }, generateCrsf: CsrfGenerator = SECURE_CSRF, responseType: ResponseType = ResponseType.Code, idTokenConsumer: IdTokenConsumer = IdTokenConsumer.NoOp)
Provides a configured set of objects for use with an OAuth2 provider.

Properties

Name Summary
api val api: HttpHandler
authFilter val authFilter: Filter
callback val callback: HttpHandler
providerConfig val providerConfig: OAuthProviderConfig
scopes val scopes: List<String>

Functions

Name Summary
authFilter fun authFilter(requestJwts: RequestJwts): Filter

Extension Functions

Name Summary
with fun <T> T.with(vararg modifiers: (T) -> T): T

Companion Object Extension Functions

Name Summary
auth0 fun OAuthProvider.Companion.auth0(auth0Uri: Uri, client: HttpHandler, credentials: Credentials, callbackUri: Uri, oAuthPersistence: OAuthPersistence): OAuthProvider
Preconfigured OAuthProviders go hereā€¦
dropbox fun OAuthProvider.Companion.dropbox(client: HttpHandler, credentials: Credentials, callbackUri: Uri, oAuthPersistence: OAuthPersistence): OAuthProvider
gitHub fun OAuthProvider.Companion.gitHub(client: HttpHandler, credentials: Credentials, callbackUri: Uri, oAuthPersistence: OAuthPersistence, scopes: List<String> = listOf("user")): OAuthProvider
google fun OAuthProvider.Companion.google(client: HttpHandler, credentials: Credentials, callbackUri: Uri, oAuthPersistence: OAuthPersistence, scopes: List<String> = listOf("openid")): OAuthProvider
soundCloud fun OAuthProvider.Companion.soundCloud(client: HttpHandler, credentials: Credentials, callbackUri: Uri, oAuthPersistence: OAuthPersistence): OAuthProvider