public class ClientIdAndSecretCredentialsProvider extends Object implements ClientCredentialsProvider
Modifier and Type | Field and Description |
---|---|
static String |
PROVIDER_ID |
Constructor and Description |
---|
ClientIdAndSecretCredentialsProvider() |
Modifier and Type | Method and Description |
---|---|
String |
getId()
Return the ID of the provider.
|
void |
init(KeycloakDeployment deployment,
Object config)
Called by adapter during deployment of your application.
|
void |
setClientCredentials(KeycloakDeployment deployment,
Map<String,String> requestHeaders,
Map<String,String> formParams)
Called every time adapter needs to perform backchannel request
|
public static final String PROVIDER_ID
public ClientIdAndSecretCredentialsProvider()
public String getId()
ClientCredentialsProvider
getId
in interface ClientCredentialsProvider
public void init(KeycloakDeployment deployment, Object config)
ClientCredentialsProvider
init
in interface ClientCredentialsProvider
deployment
- the adapter configurationconfig
- the configuration of your provider read from keycloak.json . For the kerberos-keytab example above, it will return map with the single key "keytab" with value "/tmp/foo"public void setClientCredentials(KeycloakDeployment deployment, Map<String,String> requestHeaders, Map<String,String> formParams)
ClientCredentialsProvider
setClientCredentials
in interface ClientCredentialsProvider
deployment
- Fully resolved deploymentrequestHeaders
- You should put any HTTP request headers you want to use for authentication of client. These headers will be attached to the HTTP request sent to Keycloak serverformParams
- You should put any request parameters you want to use for authentication of client. These parameters will be attached to the HTTP request sent to Keycloak serverCopyright © 2019 JBoss by Red Hat. All rights reserved.