diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/authserver/OAuth2AuthorizationServerConfiguration.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/authserver/OAuth2AuthorizationServerConfiguration.java index f2038ea95c..848864341b 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/authserver/OAuth2AuthorizationServerConfiguration.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/authserver/OAuth2AuthorizationServerConfiguration.java @@ -92,6 +92,16 @@ public class OAuth2AuthorizationServerConfiguration AuthorityUtils.authorityListToSet(this.details.getAuthorities()) .toArray(new String[0])) .scopes(this.details.getScope().toArray(new String[0])); + + if (this.details.getAutoApproveScopes() != null) { + builder.autoApprove(this.details.getAutoApproveScopes().toArray(new String[0])); + } + if (this.details.getAccessTokenValiditySeconds() != null) { + builder.accessTokenValiditySeconds(this.details.getAccessTokenValiditySeconds()); + } + if (this.details.getRefreshTokenValiditySeconds() != null) { + builder.refreshTokenValiditySeconds(this.details.getRefreshTokenValiditySeconds()); + } if (this.details.getRegisteredRedirectUri() != null) { builder.redirectUris( this.details.getRegisteredRedirectUri().toArray(new String[0]));