Skip to content

Commit

Permalink
Polish
Browse files Browse the repository at this point in the history
  • Loading branch information
snicoll committed Oct 3, 2017
1 parent dbe1d96 commit bf945cc
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<>();

Expand Down Expand Up @@ -92,29 +92,29 @@ public static class Registration {
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;

Expand Down Expand Up @@ -189,28 +189,28 @@ public void setClientName(String clientName) {
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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ private static ClientRegistration getClientRegistration(String registrationId, R
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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
class OAuth2WebSecurityConfiguration {

@Configuration
private static class OAuth2WebSecurityConfigurationAdapter extends WebSecurityConfigurerAdapter {
static class OAuth2WebSecurityConfigurationAdapter extends WebSecurityConfigurerAdapter {

private final ClientRegistrationRepository clientRegistrationRepository;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
# ----------------------------------------
Expand Down

0 comments on commit bf945cc

Please sign in to comment.