Search code examples
springspring-mvcspring-bootspring-securityspring-oauth2

What are the endpoints oauth/check_token/ and oauth/token_key/?


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?


Solution

  • 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.