Package io.pravega.shared.security.auth
Class DefaultCredentials
- java.lang.Object
-
- io.pravega.shared.security.auth.DefaultCredentials
-
- All Implemented Interfaces:
Credentials,java.io.Serializable
public class DefaultCredentials extends java.lang.Object implements Credentials
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DefaultCredentials(@NonNull java.lang.String password, @NonNull java.lang.String userName)Creates a new object containing a token that is valid for Basic authentication scheme.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancanEqual(java.lang.Object other)booleanequals(java.lang.Object o)java.lang.StringgetAuthenticationToken()Returns the authorization token to be sent to Pravega.java.lang.StringgetAuthenticationType()Returns the authentication type.inthashCode()
-
-
-
Constructor Detail
-
DefaultCredentials
public DefaultCredentials(@NonNull @NonNull java.lang.String password, @NonNull @NonNull java.lang.String userName)Creates a new object containing a token that is valid for Basic authentication scheme. The object encapsulates a token value comprising of a Base64 encoded value of ": ". - Parameters:
password- the passworduserName- the user name
-
-
Method Detail
-
getAuthenticationType
public java.lang.String getAuthenticationType()
Description copied from interface:CredentialsReturns the authentication type. Pravega can support multiple authentication types in a single deployment.- Specified by:
getAuthenticationTypein interfaceCredentials- Returns:
- the authentication type expected by the these credentials.
-
getAuthenticationToken
public java.lang.String getAuthenticationToken()
Description copied from interface:CredentialsReturns the authorization token to be sent to Pravega.- Specified by:
getAuthenticationTokenin interfaceCredentials- Returns:
- A token in token68-compatible format (as defined by RFC 7235).
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
canEqual
protected boolean canEqual(java.lang.Object other)
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-