Creating the JwtTokenStore Bean

We will create the JwtTokenStore, which will be used to get token information. The class should look like this:

package springfive.airline.airlineplanes.infra.oauth;import org.springframework.beans.factory.annotation.Value;import org.springframework.context.annotation.Bean;import org.springframework.context.annotation.Configuration;import org.springframework.security.oauth2.provider.token.store.JwtAccessTokenConverter;import org.springframework.security.oauth2.provider.token.store.JwtTokenStore;@Configurationpublic class OAuthTokenConfiguration {  @Value("${config.oauth2.privateKey}")  private String privateKey;  @Value("${config.oauth2.publicKey}")  private String publicKey;  @Bean  public JwtTokenStore tokenStore ...

Get Spring 5.0 By Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.