Class OidcIdToken.Builder

  • Enclosing class:
    OidcIdToken

    public static final class OidcIdToken.Builder
    extends java.lang.Object
    A builder for OidcIdTokens
    Since:
    5.3
    • Method Detail

      • claim

        public OidcIdToken.Builder claim​(java.lang.String name,
                                         java.lang.Object value)
        Use this claim in the resulting OidcIdToken
        Parameters:
        name - The claim name
        value - The claim value
        Returns:
        the OidcIdToken.Builder for further configurations
      • claims

        public OidcIdToken.Builder claims​(java.util.function.Consumer<java.util.Map<java.lang.String,​java.lang.Object>> claimsConsumer)
        Provides access to every claim(String, Object) declared so far with the possibility to add, replace, or remove.
        Parameters:
        claimsConsumer - the consumer
        Returns:
        the OidcIdToken.Builder for further configurations
      • accessTokenHash

        public OidcIdToken.Builder accessTokenHash​(java.lang.String accessTokenHash)
        Use this access token hash in the resulting OidcIdToken
        Parameters:
        accessTokenHash - The access token hash to use
        Returns:
        the OidcIdToken.Builder for further configurations
      • audience

        public OidcIdToken.Builder audience​(java.util.Collection<java.lang.String> audience)
        Use this audience in the resulting OidcIdToken
        Parameters:
        audience - The audience(s) to use
        Returns:
        the OidcIdToken.Builder for further configurations
      • authTime

        public OidcIdToken.Builder authTime​(java.time.Instant authenticatedAt)
        Use this authentication Instant in the resulting OidcIdToken
        Parameters:
        authenticatedAt - The authentication Instant to use
        Returns:
        the OidcIdToken.Builder for further configurations
      • authenticationContextClass

        public OidcIdToken.Builder authenticationContextClass​(java.lang.String authenticationContextClass)
        Use this authentication context class reference in the resulting OidcIdToken
        Parameters:
        authenticationContextClass - The authentication context class reference to use
        Returns:
        the OidcIdToken.Builder for further configurations
      • authenticationMethods

        public OidcIdToken.Builder authenticationMethods​(java.util.List<java.lang.String> authenticationMethods)
        Use these authentication methods in the resulting OidcIdToken
        Parameters:
        authenticationMethods - The authentication methods to use
        Returns:
        the OidcIdToken.Builder for further configurations
      • authorizationCodeHash

        public OidcIdToken.Builder authorizationCodeHash​(java.lang.String authorizationCodeHash)
        Use this authorization code hash in the resulting OidcIdToken
        Parameters:
        authorizationCodeHash - The authorization code hash to use
        Returns:
        the OidcIdToken.Builder for further configurations
      • authorizedParty

        public OidcIdToken.Builder authorizedParty​(java.lang.String authorizedParty)
        Use this authorized party in the resulting OidcIdToken
        Parameters:
        authorizedParty - The authorized party to use
        Returns:
        the OidcIdToken.Builder for further configurations
      • issuedAt

        public OidcIdToken.Builder issuedAt​(java.time.Instant issuedAt)
        Use this issued-at timestamp in the resulting OidcIdToken
        Parameters:
        issuedAt - The issued-at timestamp to use
        Returns:
        the OidcIdToken.Builder for further configurations