Note
The SPI is not finished and method signatures are still subject to change in future versions (for example to support authentication with client certificate)
| Modifier and Type | Method and Description |
|---|---|
| public String | |
| public void | init(AdapterConfig
the adapter configuration adapterConfig, Object 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" config)Called by adapter during deployment of your application. |
| public void | setClientCredentials(AdapterConfig
Fully resolved deployment adapterConfig, Map<String, String> 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 server requestHeaders, Map<String, String> 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 server formParams)Called every time adapter needs to perform backchannel request |
| getId | back to summary |
|---|---|
| public String getId() Return the ID of the provider. Use this ID in the keycloak.json configuration as the subelement of the "credentials" element For example if your provider has ID "kerberos-keytab" , use the configuration like this in keycloak.json "credentials": { "kerberos-keytab": { "keytab": "/tmp/foo" } } | |
| init | back to summary |
|---|---|
| public void init(AdapterConfig adapterConfig, Object config) Called by adapter during deployment of your application. You can for example read configuration and init your authenticator here
| |
| setClientCredentials | back to summary |
|---|---|
| public void setClientCredentials(AdapterConfig adapterConfig, Map<String, String> requestHeaders, Map<String, String> formParams) Called every time adapter needs to perform backchannel request
| |