Package com.mongodb

Class MongoSecurityException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.mongodb.MongoException
com.mongodb.MongoClientException
com.mongodb.MongoSecurityException
All Implemented Interfaces:
Serializable

public class MongoSecurityException extends MongoClientException
This exception is thrown when there is an error reported by the underlying client authentication mechanism.
Since:
3.0
  • Constructor Details

    • MongoSecurityException

      public MongoSecurityException(MongoCredential credential, String message, Throwable cause)
      Construct an instance
      Parameters:
      credential - the credential
      message - the message
      cause - the cause
    • MongoSecurityException

      public MongoSecurityException(MongoCredential credential, String message)
      Construct an instance
      Parameters:
      credential - the credential
      message - the message
  • Method Details

    • getCredential

      public MongoCredential getCredential()
      The credential being authenticated.
      Returns:
      the credential