Class CadfCredential.Builder

  • Enclosing class:
    CadfCredential

    public static class CadfCredential.Builder
    extends java.lang.Object
    • Constructor Detail

      • Builder

        public Builder​(java.lang.String token)
        Constructs a Builder instance based on the Credential token
        Parameters:
        token - -- String. The primary opaque or non-opaque identity or security token (e.g., an opaque or obfuscated user ID, opaque security token string, or security certificate).
    • Method Detail

      • type

        public CadfCredential.Builder type​(java.lang.String type)
        Set the optional credential type property.
        Parameters:
        type - -- String. Type of credential. (e.g., auth. token, identity token, etc.)
        Returns:
        Builder instance
      • authority

        public CadfCredential.Builder authority​(java.lang.String authority)
        Set the optional authority property.
        Parameters:
        authority - - String. The trusted authority (a service) that understands and can verify the credential.
        Returns:
        Builder instance
      • assertions

        public CadfCredential.Builder assertions​(CadfMapItem[] assertions)
        Set the optional assertions property. This property contains a list of additional opaque or non-opaque assertions or attributes that belong to the credential. One example might be the certificate trust chain if the credential is a certificate.
        Parameters:
        assertions - -- Array of CadfMapItem. Optional list of additional opaque or non-opaque assertions or attributes that belong to the credential.
        Returns:
        Builder instance
      • assertions

        public CadfCredential.Builder assertions​(java.util.ArrayList<CadfMapItem> assertions)
        Set the optional assertions property. This property contains a list of additional opaque or non-opaque assertions or attributes that belong to the credential. One example might be the certificate trust chain if the credential is a certificate.
        Parameters:
        assertions - -- Array of CadfMapItem. Optional list of additional opaque or non-opaque assertions or attributes that belong to the credential.
        Returns:
        Builder instance
      • build

        public CadfCredential build()
                             throws java.lang.IllegalStateException
        Builds the CadfCredential object
        Returns:
        CadfCredential
        Throws:
        java.lang.IllegalStateException - when the event does not meet the specification.