Backend API. Server-side code: this runs in a Codename One backend, not in the app on the device.

public static final class OAuth2ResourceServerConfigurer.JwtConfigurer

  1. Object
  2. OAuth2ResourceServerConfigurer.JwtConfigurer

How the JWTs of a resource server are verified and read.

http.oauth2ResourceServer(oauth2 -> oauth2.jwt(jwt -> jwt
        .decoder(DefaultJwtDecoder.withPublicKey(key).build())
        .jwtAuthenticationConverter(converter)));

Methods

public OAuth2ResourceServerConfigurer.JwtConfigurer decoder(JwtDecoder decoder)The decoder, in place of the application’s bean and the properties.
public OAuth2ResourceServerConfigurer.JwtConfigurer jwkSetUri(String jwkSetUri)Verifies with the keys published at this address, accepting RS256.
public OAuth2ResourceServerConfigurer.JwtConfigurer jwtAuthenticationConverter(Converter<Jwt, ? extends AbstractAuthenticationToken> converter)What makes an authentication of a verified token: its authorities and its name.
public OAuth2ResourceServerConfigurer.JwtConfigurer authenticationManager(AuthenticationManager authenticationManager)What authenticates a token, in place of everything else here.

Inherited methods

Method details

decoder

public OAuth2ResourceServerConfigurer.JwtConfigurer decoder(JwtDecoder decoder)
The decoder, in place of the application’s bean and the properties.

jwkSetUri

public OAuth2ResourceServerConfigurer.JwtConfigurer jwkSetUri(String jwkSetUri)
Verifies with the keys published at this address, accepting RS256.

jwtAuthenticationConverter

public OAuth2ResourceServerConfigurer.JwtConfigurer jwtAuthenticationConverter(Converter<Jwt, ? extends AbstractAuthenticationToken> converter)
What makes an authentication of a verified token: its authorities and its name. See JwtAuthenticationConverter.

authenticationManager

public OAuth2ResourceServerConfigurer.JwtConfigurer authenticationManager(AuthenticationManager authenticationManager)
What authenticates a token, in place of everything else here.