Package com.mongodb

Class MongoCredential.OidcCallbackResult

java.lang.Object
com.mongodb.MongoCredential.OidcCallbackResult
Enclosing class:
MongoCredential

public static final class MongoCredential.OidcCallbackResult extends Object
The OIDC credential information.
Since:
5.1
  • Constructor Details

    • OidcCallbackResult

      public OidcCallbackResult(String accessToken)
      An access token that does not expire.
      Parameters:
      accessToken - The OIDC access token.
    • OidcCallbackResult

      public OidcCallbackResult(String accessToken, Duration expiresIn)
      Parameters:
      accessToken - The OIDC access token.
      expiresIn - Time until the access token expires. A zero-length duration means that the access token does not expire.
    • OidcCallbackResult

      public OidcCallbackResult(String accessToken, Duration expiresIn, @Nullable String refreshToken)
      Parameters:
      accessToken - The OIDC access token.
      expiresIn - Time until the access token expires. A zero-length duration means that the access token does not expire.
      refreshToken - The refresh token. If null, refresh will not be attempted.
  • Method Details

    • getAccessToken

      public String getAccessToken()
      Returns:
      The OIDC access token.
    • getRefreshToken

      @Nullable public String getRefreshToken()
      Returns:
      The OIDC refresh token. If null, refresh will not be attempted.