The following command activates the end of the following:
@Override
public void configure(final AuthorizationServerSecurityConfigurer oauthServer) {
oauthServer.tokenKeyAccess("permitAll()").checkTokenAccess("isAuthenticated()");
}
Now, my question is, what are the uses of these two endpoints and in what ways or places are they used?
Take a look at the OAuth 2 Developers Guide.
The tokenKeyAccess()
configures access for the endpoint exposing the public key used for signing JWT tokens.
The checkTokenAccess()
configures access for the endpoint used to decode access tokens.