diff --git a/pig-auth/src/main/java/com/pig4cloud/pig/auth/support/base/OAuth2ResourceOwnerBaseAuthenticationProvider.java b/pig-auth/src/main/java/com/pig4cloud/pig/auth/support/base/OAuth2ResourceOwnerBaseAuthenticationProvider.java index 0f886493..0ef6892c 100644 --- a/pig-auth/src/main/java/com/pig4cloud/pig/auth/support/base/OAuth2ResourceOwnerBaseAuthenticationProvider.java +++ b/pig-auth/src/main/java/com/pig4cloud/pig/auth/support/base/OAuth2ResourceOwnerBaseAuthenticationProvider.java @@ -111,29 +111,29 @@ public abstract class OAuth2ResourceOwnerBaseAuthenticationProvider authorizedScopes; // Default to configured scopes - if (!CollectionUtils.isEmpty(resouceOwnerBaseAuthentication.getScopes())) { - for (String requestedScope : resouceOwnerBaseAuthentication.getScopes()) { + if (!CollectionUtils.isEmpty(resourceOwnerBaseAuthentication.getScopes())) { + for (String requestedScope : resourceOwnerBaseAuthentication.getScopes()) { if (!registeredClient.getScopes().contains(requestedScope)) { throw new OAuth2AuthenticationException(OAuth2ErrorCodes.INVALID_SCOPE); } } - authorizedScopes = new LinkedHashSet<>(resouceOwnerBaseAuthentication.getScopes()); + authorizedScopes = new LinkedHashSet<>(resourceOwnerBaseAuthentication.getScopes()); } else { throw new ScopeException(OAuth2ErrorCodesExpand.SCOPE_IS_EMPTY); } - Map reqParameters = resouceOwnerBaseAuthentication.getAdditionalParameters(); + Map reqParameters = resourceOwnerBaseAuthentication.getAdditionalParameters(); try { UsernamePasswordAuthenticationToken usernamePasswordAuthenticationToken = buildToken(reqParameters); @@ -149,14 +149,14 @@ public abstract class OAuth2ResourceOwnerBaseAuthenticationProvider