Polish docs gh-1725
This commit is contained in:
@@ -71,6 +71,10 @@ public class SecurityConfig {
|
|||||||
authorizationServer
|
authorizationServer
|
||||||
.oidc(Customizer.withDefaults()) // Enable OpenID Connect 1.0
|
.oidc(Customizer.withDefaults()) // Enable OpenID Connect 1.0
|
||||||
)
|
)
|
||||||
|
.authorizeHttpRequests((authorize) ->
|
||||||
|
authorize
|
||||||
|
.anyRequest().authenticated()
|
||||||
|
)
|
||||||
// Redirect to the login page when not authenticated from the
|
// Redirect to the login page when not authenticated from the
|
||||||
// authorization endpoint
|
// authorization endpoint
|
||||||
.exceptionHandling((exceptions) -> exceptions
|
.exceptionHandling((exceptions) -> exceptions
|
||||||
|
|||||||
@@ -49,6 +49,10 @@ public class SecurityConfig {
|
|||||||
authorizationServer
|
authorizationServer
|
||||||
.oidc(Customizer.withDefaults()) // Enable OpenID Connect 1.0
|
.oidc(Customizer.withDefaults()) // Enable OpenID Connect 1.0
|
||||||
)
|
)
|
||||||
|
.authorizeHttpRequests((authorize) ->
|
||||||
|
authorize
|
||||||
|
.anyRequest().authenticated()
|
||||||
|
)
|
||||||
// Redirect to the login page when not authenticated from the
|
// Redirect to the login page when not authenticated from the
|
||||||
// authorization endpoint
|
// authorization endpoint
|
||||||
.exceptionHandling((exceptions) -> exceptions
|
.exceptionHandling((exceptions) -> exceptions
|
||||||
|
|||||||
@@ -44,6 +44,10 @@ public class SecurityConfig {
|
|||||||
.authenticationProviders(configureCustomClientMetadataConverters()) // <2>
|
.authenticationProviders(configureCustomClientMetadataConverters()) // <2>
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
)
|
||||||
|
.authorizeHttpRequests((authorize) ->
|
||||||
|
authorize
|
||||||
|
.anyRequest().authenticated()
|
||||||
);
|
);
|
||||||
// @formatter:on
|
// @formatter:on
|
||||||
|
|
||||||
|
|||||||
@@ -45,6 +45,10 @@ public class SecurityConfig {
|
|||||||
authorizationServer
|
authorizationServer
|
||||||
.oidc(Customizer.withDefaults()) // Enable OpenID Connect 1.0
|
.oidc(Customizer.withDefaults()) // Enable OpenID Connect 1.0
|
||||||
)
|
)
|
||||||
|
.authorizeHttpRequests((authorize) ->
|
||||||
|
authorize
|
||||||
|
.anyRequest().authenticated()
|
||||||
|
)
|
||||||
// Redirect to the OAuth 2.0 Login endpoint when not authenticated
|
// Redirect to the OAuth 2.0 Login endpoint when not authenticated
|
||||||
// from the authorization endpoint
|
// from the authorization endpoint
|
||||||
.exceptionHandling((exceptions) -> exceptions
|
.exceptionHandling((exceptions) -> exceptions
|
||||||
|
|||||||
@@ -70,6 +70,10 @@ public class EnableUserInfoSecurityConfig {
|
|||||||
authorizationServer
|
authorizationServer
|
||||||
.oidc(Customizer.withDefaults()) // <2>
|
.oidc(Customizer.withDefaults()) // <2>
|
||||||
)
|
)
|
||||||
|
.authorizeHttpRequests((authorize) ->
|
||||||
|
authorize
|
||||||
|
.anyRequest().authenticated()
|
||||||
|
)
|
||||||
.exceptionHandling((exceptions) -> exceptions
|
.exceptionHandling((exceptions) -> exceptions
|
||||||
.defaultAuthenticationEntryPointFor(
|
.defaultAuthenticationEntryPointFor(
|
||||||
new LoginUrlAuthenticationEntryPoint("/login"),
|
new LoginUrlAuthenticationEntryPoint("/login"),
|
||||||
|
|||||||
@@ -206,6 +206,10 @@ public class JpaTests {
|
|||||||
authorizationServer
|
authorizationServer
|
||||||
.oidc(Customizer.withDefaults()) // Enable OpenID Connect 1.0
|
.oidc(Customizer.withDefaults()) // Enable OpenID Connect 1.0
|
||||||
)
|
)
|
||||||
|
.authorizeHttpRequests((authorize) ->
|
||||||
|
authorize
|
||||||
|
.anyRequest().authenticated()
|
||||||
|
)
|
||||||
.exceptionHandling((exceptions) -> exceptions
|
.exceptionHandling((exceptions) -> exceptions
|
||||||
.defaultAuthenticationEntryPointFor(
|
.defaultAuthenticationEntryPointFor(
|
||||||
new LoginUrlAuthenticationEntryPoint("/login"),
|
new LoginUrlAuthenticationEntryPoint("/login"),
|
||||||
|
|||||||
Reference in New Issue
Block a user