public class JWTClientCredentialsProvider extends Object implements ClientCredentialsProvider
| Modifier and Type | Field and Description |
|---|---|
static String |
PROVIDER_ID |
| Constructor and Description |
|---|
JWTClientCredentialsProvider() |
| Modifier and Type | Method and Description |
|---|---|
protected JsonWebToken |
createRequestToken(String clientId,
String realmInfoUrl) |
String |
createSignedRequestToken(String clientId,
String realmInfoUrl) |
String |
getId()
Return the ID of the provider.
|
PublicKey |
getPublicKey() |
protected int |
getTokenTimeout() |
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 |
setTokenTimeout(int tokenTimeout) |
void |
setupKeyPair(KeyPair keyPair) |
public static final String PROVIDER_ID
public String getId()
ClientCredentialsProvidergetId in interface ClientCredentialsProviderpublic void setupKeyPair(KeyPair keyPair)
public void setTokenTimeout(int tokenTimeout)
protected int getTokenTimeout()
public PublicKey getPublicKey()
public 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 String createSignedRequestToken(String clientId, String realmInfoUrl)
protected JsonWebToken createRequestToken(String clientId, String realmInfoUrl)
Copyright © 2022 JBoss by Red Hat. All rights reserved.