com.marklogic.xcc

## Interface UserCredentials

-     public interface UserCredentials

  This interface encapsulates a user identity. It is intended primarily for internal use.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `com.marklogic.xcc.impl.Credentials.PDCloudAuthConfig` | `getPDCloudAuthConfig()`
    `java.lang.String` | `getUserName()` The user name associated with this credential object.
    `java.lang.String` | `toHttpBasicAuth()` Returns an HTTP basic authentication string.
    `java.lang.String` | `toHttpDigestAuth(java.lang.String method, java.lang.String uri, java.lang.String challengeHeader)` Returns an HTTP digest authentication string.
    `java.lang.String` | `toHttpNegotiateAuth(java.lang.String hostName, java.lang.String challengeHeader)` Returns an HTTP negotiate authentication string.
    `java.lang.String` | `toMLCloudAuth()` Returns an authentication string for MarkLogic Cloud token-based authentication.
    `java.lang.String` | `toOAuth()` Returns an authentication string for OAuth

- - ### Method Detail

    - #### getUserName

          java.lang.String getUserName()

      The user name associated with this credential object.
      Returns:
        The user name as a String.

    - #### getPDCloudAuthConfig

          com.marklogic.xcc.impl.Credentials.PDCloudAuthConfig getPDCloudAuthConfig()

    - #### toHttpBasicAuth

          java.lang.String toHttpBasicAuth()

      Returns an HTTP basic authentication string.
      Returns:
        An HTTP basic authentication header value.

    - #### toHttpDigestAuth

          java.lang.String toHttpDigestAuth(java.lang.String method,
                                            java.lang.String uri,
                                            java.lang.String challengeHeader)

      Returns an HTTP digest authentication string.
      Returns:
        An HTTP digest authentication header value.

    - #### toHttpNegotiateAuth

          java.lang.String toHttpNegotiateAuth(java.lang.String hostName,
                                               java.lang.String challengeHeader)

      Returns an HTTP negotiate authentication string.
      Returns:
        An HTTP negotiate authentication header value.

    - #### toMLCloudAuth

          java.lang.String toMLCloudAuth()

      Returns an authentication string for MarkLogic Cloud token-based authentication.
      Returns:
        An MarkLogic Cloud token-based authentication header value.

    - #### toOAuth

          java.lang.String toOAuth()

      Returns an authentication string for OAuth
      Returns:
        An OAuth header value.

Copyright © 2025 MarkLogic Corporation. All Rights Reserved.

Complete online documentation for MarkLogic Server, XQuery and related components may be found at developer.marklogic.com