public void configure(ClientDetailsServiceConfigurer clients) {
clients.inMemory()
.withClient(“client-id")
.authorizedGrantTypes("password", "refresh_token", "authorization_code")
.authorities("USER")
.scopes(“view_profile", “view_email")
.resourceIds(“user_profile”)
.secret("secret");
} void configure(AuthorizationServerEndpointsConfigurer endpoints) {
endpoints
.tokenStore(tokenStore())
.accessTokenConverter(accessTokenConverter())
.authenticationManager(authenticationManager)
.userDetailsService(userDetailsService);
}