Package com.floragunn.searchguard.user
Class AuthCredentials
- java.lang.Object
-
- com.floragunn.searchguard.user.AuthCredentials
-
public final class AuthCredentials extends Object
AuthCredentials are an abstraction to encapsulate credentials like passwords or generic native credentials like GSS tokens.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAuthCredentials.Builder
-
Constructor Summary
Constructors Constructor Description AuthCredentials(String username, byte[] password)Deprecated.AuthCredentials(String username, Object nativeCredentials)Deprecated.AuthCredentials(String username, String... backendRoles)Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddAttribute(String name, String value)Deprecated.voidclearSecrets()Wipe password and native credentialsAuthCredentials.Buildercopy()booleanequals(Object obj)static AuthCredentials.BuilderforUser(String username)Map<String,String>getAttributes()Set<String>getBackendRoles()ObjectgetNativeCredentials()byte[]getPassword()Map<String,Object>getStructuredAttributes()StringgetSubUserName()StringgetUsername()inthashCode()booleanisComplete()AuthCredentialsmarkComplete()Deprecated.StringtoString()
-
-
-
Constructor Detail
-
AuthCredentials
@Deprecated public AuthCredentials(String username, Object nativeCredentials)
Deprecated.
-
AuthCredentials
@Deprecated public AuthCredentials(String username, byte[] password)
Deprecated.
-
AuthCredentials
@Deprecated public AuthCredentials(String username, String... backendRoles)
Deprecated.
-
-
Method Detail
-
forUser
public static AuthCredentials.Builder forUser(String username)
-
clearSecrets
public void clearSecrets()
Wipe password and native credentials
-
getUsername
public String getUsername()
-
getSubUserName
public String getSubUserName()
-
getPassword
public byte[] getPassword()
-
getNativeCredentials
public Object getNativeCredentials()
-
getBackendRoles
public Set<String> getBackendRoles()
- Returns:
- Defensive copy of the roles this user is member of.
-
isComplete
public boolean isComplete()
-
copy
public AuthCredentials.Builder copy()
-
markComplete
@Deprecated public AuthCredentials markComplete()
Deprecated.
-
addAttribute
@Deprecated public void addAttribute(String name, String value)
Deprecated.
-
-