Class JsonWebTokenImpl

  • All Implemented Interfaces:
    Principal, AbacSupport, Principal, org.eclipse.microprofile.jwt.JsonWebToken

    public final class JsonWebTokenImpl
    extends Object
    implements org.eclipse.microprofile.jwt.JsonWebToken, Principal
    Implementation of JsonWebToken with additional support of AbacSupport.
    • Method Detail

      • getName

        public String getName()
        Specified by:
        getName in interface org.eclipse.microprofile.jwt.JsonWebToken
        Specified by:
        getName in interface Principal
      • getClaimNames

        public Set<String> getClaimNames()
        Specified by:
        getClaimNames in interface org.eclipse.microprofile.jwt.JsonWebToken
      • getClaim

        public <T> T getClaim​(String claimName)
        Specified by:
        getClaim in interface org.eclipse.microprofile.jwt.JsonWebToken
      • getClaim

        public <T> T getClaim​(String claimName,
                              Class<T> clazz)
        Produce a claim based on its name and expected class.
        Type Parameters:
        T - type
        Parameters:
        claimName - name of the claim
        clazz - expected type
        Returns:
        claim value
      • abacAttributeRaw

        public Object abacAttributeRaw​(String key)
        Description copied from interface: AbacSupport
        Return the actual property value or null if not present. This is the only method that needs to be implemented.
        Specified by:
        abacAttributeRaw in interface AbacSupport
        Parameters:
        key - key (name) of the property
        Returns:
        value of the property or null
      • id

        public String id()
        Description copied from interface: Principal
        Id of this principal.
        Specified by:
        id in interface Principal
        Returns:
        id if defined, name otherwise