Class EnteredCredentialsProvider
- java.lang.Object
-
- org.kie.server.client.credentials.EnteredCredentialsProvider
-
- All Implemented Interfaces:
CredentialsProvider
public class EnteredCredentialsProvider extends Object implements CredentialsProvider
Default implementation ofCredentialsProvider
that is expected to get user name and password when instantiating instance and then return Basic type of authorization header.
-
-
Field Summary
-
Fields inherited from interface org.kie.server.client.CredentialsProvider
BASIC_AUTH_PREFIX, TOKEN_AUTH_PREFIX
-
-
Constructor Summary
Constructors Constructor Description EnteredCredentialsProvider(String username, String password)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getAuthorization()
Returns authorization string that shall be used for setting up "Authorization" header for HTTP communication.String
getHeaderName()
Returns name of the HTTP header to be set with given authorizationString
getPassword()
String
getUsername()
void
setPassword(String password)
void
setUsername(String username)
-
-
-
Method Detail
-
getHeaderName
public String getHeaderName()
Description copied from interface:CredentialsProvider
Returns name of the HTTP header to be set with given authorization- Specified by:
getHeaderName
in interfaceCredentialsProvider
- Returns:
-
getAuthorization
public String getAuthorization()
Description copied from interface:CredentialsProvider
Returns authorization string that shall be used for setting up "Authorization" header for HTTP communication. It's expected to be completely setup including prefix (such as Basic) and encryption (such as Base64 in case of basic) if needed.- Specified by:
getAuthorization
in interfaceCredentialsProvider
- Returns:
-
getUsername
public String getUsername()
-
setUsername
public void setUsername(String username)
-
getPassword
public String getPassword()
-
setPassword
public void setPassword(String password)
-
-