Commit bf945cc1 authored by Stephane Nicoll's avatar Stephane Nicoll

Polish

parent dbe1d960
...@@ -40,7 +40,7 @@ public class OAuth2ClientProperties { ...@@ -40,7 +40,7 @@ public class OAuth2ClientProperties {
private Map<String, Provider> provider = new HashMap<>(); private Map<String, Provider> provider = new HashMap<>();
/** /**
* Client registrations. * OAuth client registrations.
*/ */
private Map<String, Registration> registration = new HashMap<>(); private Map<String, Registration> registration = new HashMap<>();
...@@ -92,29 +92,29 @@ public class OAuth2ClientProperties { ...@@ -92,29 +92,29 @@ public class OAuth2ClientProperties {
private String clientSecret; private String clientSecret;
/** /**
* The client authentication method. May be left bank then using a pre-defined * Client authentication method. May be left bank then using a pre-defined
* provider. * provider.
*/ */
private ClientAuthenticationMethod clientAuthenticationMethod; private ClientAuthenticationMethod clientAuthenticationMethod;
/** /**
* The authorization grant type. May be left bank then using a pre-defined * Authorization grant type. May be left bank then using a pre-defined
* provider. * provider.
*/ */
private AuthorizationGrantType authorizationGrantType; private AuthorizationGrantType authorizationGrantType;
/** /**
* The redirect URI. May be left bank then using a pre-defined provider. * Redirect URI. May be left bank then using a pre-defined provider.
*/ */
private String redirectUri; private String redirectUri;
/** /**
* The authorization scopes. May be left bank then using a pre-defined provider. * Authorization scopes. May be left bank then using a pre-defined provider.
*/ */
private Set<String> scope; private Set<String> scope;
/** /**
* The client name. May be left bank then using a pre-defined provider. * Client name. May be left bank then using a pre-defined provider.
*/ */
private String clientName; private String clientName;
...@@ -189,28 +189,28 @@ public class OAuth2ClientProperties { ...@@ -189,28 +189,28 @@ public class OAuth2ClientProperties {
public static class Provider { public static class Provider {
/** /**
* The authorization URI for the provider. * Authorization URI for the provider.
*/ */
private String authorizationUri; private String authorizationUri;
/** /**
* The token URI for the provider. * Token URI for the provider.
*/ */
private String tokenUri; private String tokenUri;
/** /**
* The user info URI for the provider. * User info URI for the provider.
*/ */
private String userInfoUri; private String userInfoUri;
/** /**
* The name of the attribute that will be used to extract the username from the * Name of the attribute that will be used to extract the username from the
* call to 'userInfoUri'. * call to 'userInfoUri'.
*/ */
private String userNameAttribute; private String userNameAttribute;
/** /**
* The JWK set URI for the provider. * JWK set URI for the provider.
*/ */
private String jwkSetUri; private String jwkSetUri;
......
...@@ -57,10 +57,10 @@ final class OAuth2ClientPropertiesRegistrationAdapter { ...@@ -57,10 +57,10 @@ final class OAuth2ClientPropertiesRegistrationAdapter {
providers); providers);
copyIfNotNull(properties::getClientId, builder::clientId); copyIfNotNull(properties::getClientId, builder::clientId);
copyIfNotNull(properties::getClientSecret, builder::clientSecret); copyIfNotNull(properties::getClientSecret, builder::clientSecret);
copyIfNotNull(() -> properties.getClientAuthenticationMethod(), copyIfNotNull(properties::getClientAuthenticationMethod,
builder::clientAuthenticationMethod, builder::clientAuthenticationMethod,
ClientAuthenticationMethod::getMethod); ClientAuthenticationMethod::getMethod);
copyIfNotNull(() -> properties.getAuthorizationGrantType(), copyIfNotNull(properties::getAuthorizationGrantType,
builder::authorizationGrantType, AuthorizationGrantType::getType); builder::authorizationGrantType, AuthorizationGrantType::getType);
copyIfNotNull(properties::getRedirectUri, builder::redirectUri); copyIfNotNull(properties::getRedirectUri, builder::redirectUri);
copyIfNotNull(properties::getScope, builder::scope, copyIfNotNull(properties::getScope, builder::scope,
......
...@@ -36,7 +36,7 @@ import org.springframework.security.oauth2.client.registration.ClientRegistratio ...@@ -36,7 +36,7 @@ import org.springframework.security.oauth2.client.registration.ClientRegistratio
class OAuth2WebSecurityConfiguration { class OAuth2WebSecurityConfiguration {
@Configuration @Configuration
private static class OAuth2WebSecurityConfigurationAdapter extends WebSecurityConfigurerAdapter { static class OAuth2WebSecurityConfigurationAdapter extends WebSecurityConfigurerAdapter {
private final ClientRegistrationRepository clientRegistrationRepository; private final ClientRegistrationRepository clientRegistrationRepository;
......
...@@ -484,6 +484,10 @@ content into your application; rather pick only the properties that you need. ...@@ -484,6 +484,10 @@ content into your application; rather pick only the properties that you need.
spring.security.filter.order=0 # Security filter chain order. spring.security.filter.order=0 # Security filter chain order.
spring.security.filter.dispatcher-types=ASYNC,ERROR,REQUEST # Security filter chain dispatcher types. spring.security.filter.dispatcher-types=ASYNC,ERROR,REQUEST # Security filter chain dispatcher types.
# SECURITY OAUTH2 CLIENT ({sc-spring-boot-autoconfigure}/security/oauth2/client/OAuth2ClientProperties.{sc-ext}[OAuth2ClientProperties])
spring.security.oauth2.client.provider.*= # OAuth provider details.
spring.security.oauth2.client.registration.*= # OAuth client registrations.
# ---------------------------------------- # ----------------------------------------
# DATA PROPERTIES # DATA PROPERTIES
# ---------------------------------------- # ----------------------------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment