Class PrivateKeyJwtAuthenticator
java.lang.Object
org.frankframework.http.authentication.AbstractOauthAuthenticator
org.frankframework.http.authentication.PrivateKeyJwtAuthenticator
- All Implemented Interfaces:
IOauthAuthenticator
OAuth 2.0 authenticator using the
private_key_jwt client authentication method, as defined in
RFC 7523. Also see the
Spring documentation on this topic.
A signed JWT is created using the configured private key and sent to the token endpoint as the
client_assertion parameter. Both RSA and EC keys are supported.
You can use this in your configuration like this:
<HttpSender url="..." tokenEndpoint="..."
oauthAuthenticationMethod="PRIVATE_KEY_JWT"
clientId="my-client-id">
<Keystore keystoreResource="/path/to/keystore.p12"
password="..."
alias="my-key-alias"
aliasPassword="..." />
</HttpSender>
Please note, that with this setup you cannot have a separate key/certificate to be used for SSL. This will be addressed in the future to be able to have different certificates used for SSL and private key authentication
- See Also:
-
Field Summary
Fields inherited from class AbstractOauthAuthenticator
authorizationEndpoint, clientId, clientSecret, overwriteExpiryMs, password, session, username -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected org.apache.http.client.methods.HttpEntityEnclosingRequestBasecreateRequest(org.apache.http.auth.Credentials credentials, List<org.apache.http.NameValuePair> parameters) Methods inherited from class AbstractOauthAuthenticator
createPostRequestWithForm, getOrRefreshAccessToken, getScopeHeader
-
Constructor Details
-
PrivateKeyJwtAuthenticator
public PrivateKeyJwtAuthenticator(AbstractHttpSession abstractHttpSession) throws HttpAuthenticationException - Throws:
HttpAuthenticationException
-
-
Method Details
-
configure
- Throws:
ConfigurationException
-
createRequest
protected org.apache.http.client.methods.HttpEntityEnclosingRequestBase createRequest(org.apache.http.auth.Credentials credentials, List<org.apache.http.NameValuePair> parameters) throws HttpAuthenticationException - Specified by:
createRequestin classAbstractOauthAuthenticator- Throws:
HttpAuthenticationException
-