pull/10498/merge
Stephane Nicoll 7 years ago
parent dbe1d9608d
commit bf945cc156

@ -40,7 +40,7 @@ public class OAuth2ClientProperties {
private Map<String, Provider> provider = new HashMap<>();
/**
* Client registrations.
* OAuth client registrations.
*/
private Map<String, Registration> registration = new HashMap<>();
@ -92,29 +92,29 @@ public class OAuth2ClientProperties {
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.
*/
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.
*/
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;
/**
* 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;
/**
* 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;
@ -189,28 +189,28 @@ public class OAuth2ClientProperties {
public static class Provider {
/**
* The authorization URI for the provider.
* Authorization URI for the provider.
*/
private String authorizationUri;
/**
* The token URI for the provider.
* Token URI for the provider.
*/
private String tokenUri;
/**
* The user info URI for the provider.
* User info URI for the provider.
*/
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'.
*/
private String userNameAttribute;
/**
* The JWK set URI for the provider.
* JWK set URI for the provider.
*/
private String jwkSetUri;

@ -57,10 +57,10 @@ final class OAuth2ClientPropertiesRegistrationAdapter {
providers);
copyIfNotNull(properties::getClientId, builder::clientId);
copyIfNotNull(properties::getClientSecret, builder::clientSecret);
copyIfNotNull(() -> properties.getClientAuthenticationMethod(),
copyIfNotNull(properties::getClientAuthenticationMethod,
builder::clientAuthenticationMethod,
ClientAuthenticationMethod::getMethod);
copyIfNotNull(() -> properties.getAuthorizationGrantType(),
copyIfNotNull(properties::getAuthorizationGrantType,
builder::authorizationGrantType, AuthorizationGrantType::getType);
copyIfNotNull(properties::getRedirectUri, builder::redirectUri);
copyIfNotNull(properties::getScope, builder::scope,

@ -36,7 +36,7 @@ import org.springframework.security.oauth2.client.registration.ClientRegistratio
class OAuth2WebSecurityConfiguration {
@Configuration
private static class OAuth2WebSecurityConfigurationAdapter extends WebSecurityConfigurerAdapter {
static class OAuth2WebSecurityConfigurationAdapter extends WebSecurityConfigurerAdapter {
private final ClientRegistrationRepository clientRegistrationRepository;

@ -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.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
# ----------------------------------------

Loading…
Cancel
Save