Class JWT.Builder

    • Constructor Detail

      • Builder

        public Builder()
      • Builder

        public Builder​(java.lang.String rawString)
    • Method Detail

      • setHeaderType

        public JWT.Builder setHeaderType​(java.lang.String headerType)
        Sets the JWT Header typ.
        Parameters:
        headerType - the JWT Header typ.
        Returns:
        this builder instance.
      • setHeaderAlgorithm

        public JWT.Builder setHeaderAlgorithm​(java.lang.String headerAlgorithm)
        Sets the JWT Header alg.
        Parameters:
        headerAlgorithm - the JWT Header alg.
        Returns:
        this builder instance.
      • setHeaderContentType

        public JWT.Builder setHeaderContentType​(java.lang.String headerContentType)
        Sets the JWT Header cty.
        Parameters:
        headerContentType - the JWT Header cty.
        Returns:
        this builder instance.
      • setHeaderCustomField

        public JWT.Builder setHeaderCustomField​(java.lang.String key,
                                                java.lang.Object value)
        Set the JWT Header custom field.
        Parameters:
        key - the custom field name.
        value - value the custom field value.
        Returns:
        this builder instance.
      • setClaimsSetIssuer

        public JWT.Builder setClaimsSetIssuer​(java.lang.String claimsSetIssuer)
        Sets the JWT Claims Set iss.
        Parameters:
        claimsSetIssuer - the JWT Claims Set iss.
        Returns:
        this builder instance.
      • setClaimsSetSubject

        public JWT.Builder setClaimsSetSubject​(java.lang.String claimsSetSubject)
        Sets the JWT Claims Set sub.
        Parameters:
        claimsSetSubject - the JWT Claims Set sub.
        Returns:
        this builder instance.
      • setClaimsSetAudience

        public JWT.Builder setClaimsSetAudience​(java.lang.String claimsSetAudience)
        Sets the JWT Claims Set aud for a single audience.
        Parameters:
        claimsSetAudience - the JWT Claims Set aud.
        Returns:
        this builder instance.
      • setClaimsSetAudiences

        public JWT.Builder setClaimsSetAudiences​(java.util.List<java.lang.String> claimsSetAudiences)
        Sets the JWT Claims Set aud.
        Parameters:
        claimsSetAudiences - the JWT Claims Set aud.
        Returns:
        this builder instance.
      • setClaimsSetExpirationTime

        public JWT.Builder setClaimsSetExpirationTime​(long claimsSetExpirationTime)
        Sets the JWT Claims Set exp.
        Parameters:
        claimsSetExpirationTime - the JWT Claims Set exp.
        Returns:
        this builder instance.
      • setClaimsSetNotBefore

        public JWT.Builder setClaimsSetNotBefore​(java.lang.String claimsSetNotBefore)
        Sets the JWT Claims Set nbf.
        Parameters:
        claimsSetNotBefore - the JWT Claims Set nbf.
        Returns:
        this builder instance.
      • setClaimsSetIssuedAt

        public JWT.Builder setClaimsSetIssuedAt​(long claimsSetIssuedAt)
        Sets the JWT Claims Set issuedAt.
        Parameters:
        claimsSetIssuedAt - the JWT Claims Set issuedAt.
        Returns:
        this builder instance.
      • setClaimsSetJwdId

        public JWT.Builder setClaimsSetJwdId​(java.lang.String claimsSetJwdId)
        Sets the JWT Claims Set jti.
        Parameters:
        claimsSetJwdId - the JWT Claims Set jti.
        Returns:
        this builder instance.
      • setClaimsSetType

        public JWT.Builder setClaimsSetType​(java.lang.String claimsSetType)
        Sets the JWT Claims Set typ.
        Parameters:
        claimsSetType - the JWT Claims Set typ.
        Returns:
        this builder instance.
      • setClaimsSetCustomField

        public JWT.Builder setClaimsSetCustomField​(java.lang.String key,
                                                   java.lang.Object value)
        Set the JWT Claims Set custom field.
        Parameters:
        key - the custom field name.
        value - value the custom field value.
        Returns:
        this builder instance.
      • setSignature

        public JWT.Builder setSignature​(java.lang.String signature)
        Sets the JWT signature.
        Parameters:
        signature -
        Returns:
        this builder instance.