public final class OAuth2LoginConfigurer<B extends HttpSecurityBuilder<B>> extends AbstractAuthenticationFilterConfigurer<B,OAuth2LoginConfigurer<B>,org.springframework.security.oauth2.client.web.OAuth2LoginAuthenticationFilter>
| Modifier and Type | Class and Description |
|---|---|
class |
OAuth2LoginConfigurer.AuthorizationEndpointConfig |
class |
OAuth2LoginConfigurer.RedirectionEndpointConfig |
class |
OAuth2LoginConfigurer.TokenEndpointConfig |
class |
OAuth2LoginConfigurer.UserInfoEndpointConfig |
| Constructor and Description |
|---|
OAuth2LoginConfigurer() |
| Modifier and Type | Method and Description |
|---|---|
OAuth2LoginConfigurer.AuthorizationEndpointConfig |
authorizationEndpoint() |
OAuth2LoginConfigurer<B> |
authorizedClientService(org.springframework.security.oauth2.client.OAuth2AuthorizedClientService authorizedClientService) |
OAuth2LoginConfigurer<B> |
clientRegistrationRepository(org.springframework.security.oauth2.client.registration.ClientRegistrationRepository clientRegistrationRepository) |
void |
configure(B http)
Configure the
SecurityBuilder by setting the necessary properties on the
SecurityBuilder. |
protected org.springframework.security.web.util.matcher.RequestMatcher |
createLoginProcessingUrlMatcher(java.lang.String loginProcessingUrl)
Create the
RequestMatcher given a loginProcessingUrl |
void |
init(B http)
Initialize the
SecurityBuilder. |
OAuth2LoginConfigurer<B> |
loginPage(java.lang.String loginPage)
Specifies the URL to send users to if login is required.
|
OAuth2LoginConfigurer.RedirectionEndpointConfig |
redirectionEndpoint() |
OAuth2LoginConfigurer.TokenEndpointConfig |
tokenEndpoint() |
OAuth2LoginConfigurer.UserInfoEndpointConfig |
userInfoEndpoint() |
authenticationDetailsSource, defaultSuccessUrl, defaultSuccessUrl, failureHandler, failureUrl, getAuthenticationFilter, getFailureUrl, getLoginPage, getLoginProcessingUrl, isCustomLoginPage, loginProcessingUrl, permitAll, permitAll, setAuthenticationFilter, successHandlerdisable, withObjectPostProcessoraddObjectPostProcessor, and, getBuilder, postProcess, setBuilderpublic OAuth2LoginConfigurer<B> clientRegistrationRepository(org.springframework.security.oauth2.client.registration.ClientRegistrationRepository clientRegistrationRepository)
public OAuth2LoginConfigurer<B> authorizedClientService(org.springframework.security.oauth2.client.OAuth2AuthorizedClientService authorizedClientService)
public OAuth2LoginConfigurer<B> loginPage(java.lang.String loginPage)
AbstractAuthenticationFilterConfigurer
Specifies the URL to send users to if login is required. If used with
WebSecurityConfigurerAdapter a default login page will be generated when
this attribute is not specified.
If a URL is specified or this is not being used in conjuction with
WebSecurityConfigurerAdapter, users are required to process the specified
URL to generate a login page.
loginPage in class AbstractAuthenticationFilterConfigurer<B extends HttpSecurityBuilder<B>,OAuth2LoginConfigurer<B extends HttpSecurityBuilder<B>>,org.springframework.security.oauth2.client.web.OAuth2LoginAuthenticationFilter>public OAuth2LoginConfigurer.AuthorizationEndpointConfig authorizationEndpoint()
public OAuth2LoginConfigurer.TokenEndpointConfig tokenEndpoint()
public OAuth2LoginConfigurer.RedirectionEndpointConfig redirectionEndpoint()
public OAuth2LoginConfigurer.UserInfoEndpointConfig userInfoEndpoint()
public void init(B http) throws java.lang.Exception
SecurityConfigurerSecurityBuilder. Here only shared state should be created
and modified, but not properties on the SecurityBuilder used for building
the object. This ensures that the SecurityConfigurer.configure(SecurityBuilder) method uses
the correct shared objects when building.init in interface SecurityConfigurer<org.springframework.security.web.DefaultSecurityFilterChain,B extends HttpSecurityBuilder<B>>init in class AbstractAuthenticationFilterConfigurer<B extends HttpSecurityBuilder<B>,OAuth2LoginConfigurer<B extends HttpSecurityBuilder<B>>,org.springframework.security.oauth2.client.web.OAuth2LoginAuthenticationFilter>java.lang.Exceptionpublic void configure(B http) throws java.lang.Exception
SecurityConfigurerSecurityBuilder by setting the necessary properties on the
SecurityBuilder.configure in interface SecurityConfigurer<org.springframework.security.web.DefaultSecurityFilterChain,B extends HttpSecurityBuilder<B>>configure in class AbstractAuthenticationFilterConfigurer<B extends HttpSecurityBuilder<B>,OAuth2LoginConfigurer<B extends HttpSecurityBuilder<B>>,org.springframework.security.oauth2.client.web.OAuth2LoginAuthenticationFilter>java.lang.Exceptionprotected org.springframework.security.web.util.matcher.RequestMatcher createLoginProcessingUrlMatcher(java.lang.String loginProcessingUrl)
AbstractAuthenticationFilterConfigurerRequestMatcher given a loginProcessingUrlcreateLoginProcessingUrlMatcher in class AbstractAuthenticationFilterConfigurer<B extends HttpSecurityBuilder<B>,OAuth2LoginConfigurer<B extends HttpSecurityBuilder<B>>,org.springframework.security.oauth2.client.web.OAuth2LoginAuthenticationFilter>loginProcessingUrl - creates the RequestMatcher based upon the
loginProcessingUrlRequestMatcher to use based upon the loginProcessingUrl