Class EnteredCredentialsProvider
- java.lang.Object
-
- org.kie.server.client.credentials.EnteredCredentialsProvider
-
- All Implemented Interfaces:
CredentialsProvider
public class EnteredCredentialsProvider extends Object implements CredentialsProvider
Default implementation ofCredentialsProviderthat 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 StringgetAuthorization()Returns authorization string that shall be used for setting up "Authorization" header for HTTP communication.StringgetHeaderName()Returns name of the HTTP header to be set with given authorizationStringgetPassword()StringgetUsername()voidsetPassword(String password)voidsetUsername(String username)
-
-
-
Method Detail
-
getHeaderName
public String getHeaderName()
Description copied from interface:CredentialsProviderReturns name of the HTTP header to be set with given authorization- Specified by:
getHeaderNamein interfaceCredentialsProvider- Returns:
-
getAuthorization
public String getAuthorization()
Description copied from interface:CredentialsProviderReturns 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:
getAuthorizationin interfaceCredentialsProvider- Returns:
-
getUsername
public String getUsername()
-
setUsername
public void setUsername(String username)
-
getPassword
public String getPassword()
-
setPassword
public void setPassword(String password)
-
-