|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.mongodb.MongoCredential
@Immutable public final class MongoCredential
Represents credentials to authenticate to a mongo server, as well as the source of the credentials and the authentication mechanism to use.
Field Summary | |
---|---|
static String |
GSSAPI_MECHANISM
The GSSAPI mechanism. |
static String |
MONGODB_CR_MECHANISM
The MongoDB Challenge Response mechanism. |
Method Summary | |
---|---|
static MongoCredential |
createGSSAPICredential(String userName)
Creates a MongoCredential instance for the GSSAPI SASL mechanism. |
static MongoCredential |
createMongoCRCredential(String userName,
String database,
char[] password)
Creates a MongoCredential instance for the MongoDB Challenge Response protocol. |
boolean |
equals(Object o)
|
String |
getMechanism()
Gets the mechanism |
char[] |
getPassword()
Gets the password. |
String |
getSource()
Gets the source of the user name, typically the name of the database where the user is defined. |
String |
getUserName()
Gets the user name |
int |
hashCode()
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String GSSAPI_MECHANISM
public static final String MONGODB_CR_MECHANISM
Method Detail |
---|
public static MongoCredential createMongoCRCredential(String userName, String database, char[] password)
userName
- the user namedatabase
- the database where the user is definedpassword
- the user's password
public static MongoCredential createGSSAPICredential(String userName)
userName
- the user name
public String getMechanism()
public String getUserName()
public String getSource()
public char[] getPassword()
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |