Class JwtClaimsSetAdapter

  • All Implemented Interfaces:
    Claims, JwtClaims

    public class JwtClaimsSetAdapter
    extends java.lang.Object
    implements JwtClaims
    Adapts from JWTClaimsSet to JwtClaims.
    Since:
    1.1.0
    Author:
    Sergio del Amo
    • Constructor Summary

      Constructors 
      Constructor Description
      JwtClaimsSetAdapter​(com.nimbusds.jwt.JWTClaimsSet jwtClaimsSet)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean contains​(java.lang.String claimName)  
      java.lang.Object get​(java.lang.String claimName)
      Retrieves a value from the claims for the given name.
      java.util.Set<java.lang.String> names()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JwtClaimsSetAdapter

        public JwtClaimsSetAdapter​(com.nimbusds.jwt.JWTClaimsSet jwtClaimsSet)
        Constructor.
        Parameters:
        jwtClaimsSet - a JWT Claims set
    • Method Detail

      • get

        @Nullable
        public java.lang.Object get​(java.lang.String claimName)
        Description copied from interface: Claims
        Retrieves a value from the claims for the given name.
        Specified by:
        get in interface Claims
        Parameters:
        claimName - the claim name
        Returns:
        null if the claim not exist or the claim value.
      • names

        @Nonnull
        public java.util.Set<java.lang.String> names()
        Specified by:
        names in interface Claims
        Returns:
        All claim names.
      • contains

        public boolean contains​(java.lang.String claimName)
        Specified by:
        contains in interface Claims
        Parameters:
        claimName - the claim name
        Returns:
        false if the claim does not exist.