api

http4k / org.http4k.security

Package org.http4k.security

Code relevant to interfacing with security mechanisms such as OAuth servers.

Types

Name Summary
AccessTokenContainer data class AccessTokenContainer
CrossSiteRequestForgeryToken data class CrossSiteRequestForgeryToken
InsecureCookieBasedOAuthPersistence open class InsecureCookieBasedOAuthPersistence : OAuthPersistence
This is an example implementation which stores CSRF and AccessTokenEnvelope values in an INSECURE client-side cookie. Access-tokens for end-services are fully available to the browser so do not use this in production!
OAuthCallback class OAuthCallback : HttpHandler
OAuthPersistence interface OAuthPersistence
Provides persistence for OAuth lifecycle values:
OAuthProvider class OAuthProvider
Provides a configured set of objects for use with an OAuth2 provider.
OAuthProviderConfig data class OAuthProviderConfig
OAuthRedirectionFilter class OAuthRedirectionFilter : Filter

Type Aliases

Name Summary
CsrfGenerator typealias CsrfGenerator = () -> CrossSiteRequestForgeryToken

Companion Object 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