OAuth2LoginDsl

A Kotlin DSL to configure HttpSecurity OAuth 2.0 login using idiomatic Kotlin code.

Author

Eleftheria Stein

Since

5.3

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
var authenticationDetailsSource: AuthenticationDetailsSource<HttpServletRequest, *>?
Link copied to clipboard
var authenticationFailureHandler: AuthenticationFailureHandler?

the AuthenticationFailureHandler used after authentication success

Link copied to clipboard
var authenticationSuccessHandler: AuthenticationSuccessHandler?

the AuthenticationSuccessHandler used after authentication success

Link copied to clipboard
var authorizedClientRepository: OAuth2AuthorizedClientRepository?

the repository for authorized client(s).

Link copied to clipboard
var authorizedClientService: OAuth2AuthorizedClientService?

the service for authorized client(s).

Link copied to clipboard
var clientRegistrationRepository: ClientRegistrationRepository?

the repository of client registrations.

Link copied to clipboard

the URL to send users if authentication fails

Link copied to clipboard

the login page to redirect to if authentication is required (i.e. "/login")

Link copied to clipboard

the URL to validate the credentials

Link copied to clipboard
var oidcSessionRegistry: OidcSessionRegistry?
Link copied to clipboard

whether to grant access to the urls for failureUrl as well as for the HttpSecurityBuilder, the loginPage and loginProcessingUrl for every user

Functions

Link copied to clipboard
fun authorizationEndpoint(authorizationEndpointConfig: AuthorizationEndpointDsl.() -> Unit)

Configures the Authorization Server's Authorization Endpoint.

Link copied to clipboard
fun defaultSuccessUrl(defaultSuccessUrl: String, alwaysUse: Boolean)

Specifies where users will be redirected after authenticating successfully if they have not visited a secured page prior to authenticating or alwaysUse is true.

Link copied to clipboard
fun permitAll()

Grants access to the urls for failureUrl as well as for the HttpSecurityBuilder, the loginPage and loginProcessingUrl for every user.

Link copied to clipboard
fun redirectionEndpoint(redirectionEndpointConfig: RedirectionEndpointDsl.() -> Unit)

Configures the Authorization Server's Redirection Endpoint.

Link copied to clipboard
fun tokenEndpoint(tokenEndpointConfig: TokenEndpointDsl.() -> Unit)

Configures the Authorization Server's Token Endpoint.

Link copied to clipboard
fun userInfoEndpoint(userInfoEndpointConfig: UserInfoEndpointDsl.() -> Unit)

Configures the Authorization Server's UserInfo Endpoint.