public class JWTClientSecretCredentialsProvider extends Object implements ClientCredentialsProvider
| Modifier and Type | Field and Description |
|---|---|
static String |
PROVIDER_ID |
| Constructor and Description |
|---|
JWTClientSecretCredentialsProvider() |
| Modifier and Type | Method and Description |
|---|---|
protected JsonWebToken |
createRequestToken(String clientId,
String realmInfoUrl) |
String |
createSignedRequestToken(String clientId,
String realmInfoUrl) |
String |
createSignedRequestToken(String clientId,
String realmInfoUrl,
String algorithm) |
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
|
void |
setClientSecret(String clientSecretString) |
void |
setClientSecret(String clientSecretString,
String algorithm) |
public static final String PROVIDER_ID
public String getId()
ClientCredentialsProvidergetId in interface ClientCredentialsProviderpublic void init(KeycloakDeployment deployment, Object config)
ClientCredentialsProviderinit in interface ClientCredentialsProviderdeployment - 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)
ClientCredentialsProvidersetClientCredentials in interface ClientCredentialsProviderdeployment - 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 serverpublic void setClientSecret(String clientSecretString)
public String createSignedRequestToken(String clientId, String realmInfoUrl)
public String createSignedRequestToken(String clientId, String realmInfoUrl, String algorithm)
protected JsonWebToken createRequestToken(String clientId, String realmInfoUrl)
Copyright © 2022 JBoss by Red Hat. All rights reserved.