Class CredentialConfig


  • public class CredentialConfig
    extends Object
    Configures the credentials and authentication mechanism to connect to the MongoDB server.
    • Field Detail

      • authMechanism

        @ConfigItem
        public Optional<String> authMechanism
        Configures the authentication mechanism to use if a credential was supplied. The default is unspecified, in which case the client will pick the most secure mechanism available based on the sever version. For the GSSAPI and MONGODB-X509 mechanisms, no password is accepted, only the username. Supported values: MONGO-CR|GSSAPI|PLAIN|MONGODB-X509
      • authSource

        @ConfigItem
        public Optional<String> authSource
        Configures the source of the authentication credentials. This is typically the database that the credentials have been created. The value defaults to the database specified in the path portion of the connection string or in the 'database' configuration property.. If the database is specified in neither place, the default value is admin. This option is only respected when using the MONGO-CR mechanism (the default).
      • authMechanismProperties

        @ConfigItem
        public Map<String,​String> authMechanismProperties
        Allows passing authentication mechanism properties.
    • Constructor Detail

      • CredentialConfig

        public CredentialConfig()