Browse Source

Rename OAuth2TokenIntrospection.Builder.validateClaims() to validate()

Issue gh-161
Joe Grandja 4 years ago
parent
commit
0c70e8ad3a

+ 2 - 2
oauth2-authorization-server/src/main/java/org/springframework/security/oauth2/core/OAuth2TokenIntrospection.java

@@ -277,11 +277,11 @@ public final class OAuth2TokenIntrospection implements OAuth2TokenIntrospectionC
 		 * @return the {@link OAuth2TokenIntrospection}
 		 * @return the {@link OAuth2TokenIntrospection}
 		 */
 		 */
 		public OAuth2TokenIntrospection build() {
 		public OAuth2TokenIntrospection build() {
-			validateClaims();
+			validate();
 			return new OAuth2TokenIntrospection(this.claims);
 			return new OAuth2TokenIntrospection(this.claims);
 		}
 		}
 
 
-		private void validateClaims() {
+		private void validate() {
 			Assert.notNull(this.claims.get(OAuth2TokenIntrospectionClaimNames.ACTIVE), "active cannot be null");
 			Assert.notNull(this.claims.get(OAuth2TokenIntrospectionClaimNames.ACTIVE), "active cannot be null");
 			Assert.isInstanceOf(Boolean.class, this.claims.get(OAuth2TokenIntrospectionClaimNames.ACTIVE), "active must be of type boolean");
 			Assert.isInstanceOf(Boolean.class, this.claims.get(OAuth2TokenIntrospectionClaimNames.ACTIVE), "active must be of type boolean");
 			if (this.claims.containsKey(OAuth2TokenIntrospectionClaimNames.SCOPE)) {
 			if (this.claims.containsKey(OAuth2TokenIntrospectionClaimNames.SCOPE)) {