Class SupplierJwtDecoder

java.lang.Object
com.codename1.backend.security.oauth2.jwt.SupplierJwtDecoder
All Implemented Interfaces:
JwtDecoder

public final class SupplierJwtDecoder extends Object implements JwtDecoder

A decoder that is made when the first token arrives, and then kept.

Making a decoder from an issuer's address reads the issuer's metadata over the network. Done at start-up, an issuer that is down stops the server from starting; done here, the server starts and the first tokens fail until the issuer is back.

JwtDecoder decoder = new SupplierJwtDecoder(() -> JwtDecoders.fromIssuerLocation(issuer));
  • Constructor Details

  • Method Details

    • decode

      public Jwt decode(String token)
      Description copied from interface: JwtDecoder

      The token, once its signature has verified and its claims have passed the decoder's validators.

      Specified by:
      decode in interface JwtDecoder