Polish
Closes gh-10636
This commit is contained in:
committed by
Stephane Nicoll
parent
0af4536316
commit
5aa32b3d0f
@@ -37,12 +37,12 @@ public class OAuth2ClientProperties {
|
||||
/**
|
||||
* OAuth provider details.
|
||||
*/
|
||||
private Map<String, Provider> provider = new HashMap<>();
|
||||
private final Map<String, Provider> provider = new HashMap<>();
|
||||
|
||||
/**
|
||||
* OAuth client registrations.
|
||||
*/
|
||||
private Map<String, Registration> registration = new HashMap<>();
|
||||
private final Map<String, Registration> registration = new HashMap<>();
|
||||
|
||||
public Map<String, Provider> getProvider() {
|
||||
return this.provider;
|
||||
@@ -92,28 +92,28 @@ public class OAuth2ClientProperties {
|
||||
private String clientSecret;
|
||||
|
||||
/**
|
||||
* Client authentication method. May be left bank then using a pre-defined
|
||||
* Client authentication method. May be left blank then using a pre-defined
|
||||
* provider.
|
||||
*/
|
||||
private String clientAuthenticationMethod;
|
||||
|
||||
/**
|
||||
* Authorization grant type. May be left bank then using a pre-defined provider.
|
||||
* Authorization grant type. May be left blank then using a pre-defined provider.
|
||||
*/
|
||||
private String authorizationGrantType;
|
||||
|
||||
/**
|
||||
* Redirect URI. May be left bank then using a pre-defined provider.
|
||||
* Redirect URI. May be left blank then using a pre-defined provider.
|
||||
*/
|
||||
private String redirectUri;
|
||||
|
||||
/**
|
||||
* Authorization scopes. May be left bank then using a pre-defined provider.
|
||||
* Authorization scopes. May be left blank then using a pre-defined provider.
|
||||
*/
|
||||
private Set<String> scope;
|
||||
|
||||
/**
|
||||
* Client name. May be left bank then using a pre-defined provider.
|
||||
* Client name. May be left blank then using a pre-defined provider.
|
||||
*/
|
||||
private String clientName;
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ import org.springframework.boot.diagnostics.AbstractFailureAnalyzer;
|
||||
import org.springframework.boot.diagnostics.FailureAnalysis;
|
||||
|
||||
/**
|
||||
* A {@link AbstractFailureAnalyzer} for {@link NonUniqueSessionRepositoryException}.
|
||||
* An {@link AbstractFailureAnalyzer} for {@link NonUniqueSessionRepositoryException}.
|
||||
*
|
||||
* @author Stephane Nicoll
|
||||
*/
|
||||
|
||||
@@ -29,9 +29,7 @@ import org.apache.tomcat.jdbc.pool.DataSource;
|
||||
import org.apache.tomcat.jdbc.pool.DataSourceProxy;
|
||||
import org.apache.tomcat.jdbc.pool.jmx.ConnectionPool;
|
||||
import org.junit.After;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.rules.ExpectedException;
|
||||
|
||||
import org.springframework.boot.autoconfigure.jmx.JmxAutoConfiguration;
|
||||
import org.springframework.boot.test.util.TestPropertyValues;
|
||||
@@ -47,9 +45,6 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
*/
|
||||
public class DataSourceJmxConfigurationTests {
|
||||
|
||||
@Rule
|
||||
public ExpectedException thrown = ExpectedException.none();
|
||||
|
||||
private ConfigurableApplicationContext context;
|
||||
|
||||
@After
|
||||
|
||||
@@ -23,9 +23,7 @@ import com.mongodb.MongoCredential;
|
||||
import com.mongodb.ServerAddress;
|
||||
import com.mongodb.connection.Cluster;
|
||||
import com.mongodb.connection.ClusterSettings;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.rules.ExpectedException;
|
||||
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
@@ -45,9 +43,6 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
*/
|
||||
public class MongoClientFactoryTests {
|
||||
|
||||
@Rule
|
||||
public ExpectedException thrown = ExpectedException.none();
|
||||
|
||||
private MockEnvironment environment = new MockEnvironment();
|
||||
|
||||
@Test
|
||||
|
||||
@@ -48,7 +48,7 @@ public class OAuth2ClientPropertiesRegistrationAdapterTests {
|
||||
provider.setAuthorizationUri("http://example.com/auth");
|
||||
provider.setTokenUri("http://example.com/token");
|
||||
provider.setUserInfoUri("http://example.com/info");
|
||||
provider.setJwkSetUri("http://example.com/jkw");
|
||||
provider.setJwkSetUri("http://example.com/jwk");
|
||||
Registration registration = new Registration();
|
||||
registration.setProvider("provider");
|
||||
registration.setClientId("clientId");
|
||||
@@ -69,7 +69,7 @@ public class OAuth2ClientPropertiesRegistrationAdapterTests {
|
||||
assertThat(adaptedProvider.getTokenUri()).isEqualTo("http://example.com/token");
|
||||
assertThat(adaptedProvider.getUserInfoEndpoint().getUri())
|
||||
.isEqualTo("http://example.com/info");
|
||||
assertThat(adaptedProvider.getJwkSetUri()).isEqualTo("http://example.com/jkw");
|
||||
assertThat(adaptedProvider.getJwkSetUri()).isEqualTo("http://example.com/jwk");
|
||||
assertThat(adapted.getRegistrationId()).isEqualTo("registration");
|
||||
assertThat(adapted.getClientId()).isEqualTo("clientId");
|
||||
assertThat(adapted.getClientSecret()).isEqualTo("clientSecret");
|
||||
|
||||
Reference in New Issue
Block a user