Class DPoPProofs
java.lang.Object
com.irurueta.authserver.serviceclient.infrastructure.resourceserver.DPoPProofs
Creates the DPoP proofs (RFC 9449) of the service client. Spring Security has no client-side DPoP support, so the
proofs are made with Nimbus'
DPoPProofFactory, signed with a key pair that lives as long as the process.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final com.nimbusds.oauth2.sdk.dpop.DPoPProofFactoryCreates and signs the proofs. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreates the proof of a token request: it binds the request, not yet any token.Creates the proof of a call that carries an access token: it also binds the token (athclaim).private static URIwithoutQuery(URI uri) Removes the query and the fragment, whichhtudoes not include.
-
Field Details
-
proofFactory
private final com.nimbusds.oauth2.sdk.dpop.DPoPProofFactory proofFactoryCreates and signs the proofs.
-
-
Constructor Details
-
DPoPProofs
public DPoPProofs()
-
-
Method Details
-
proof
Creates the proof of a token request: it binds the request, not yet any token.- Parameters:
method- HTTP method of the request.uri- URI of the request.- Returns:
- the serialized proof JWT.
- Throws:
IllegalStateException- if the proof cannot be signed.
-
proof
Creates the proof of a call that carries an access token: it also binds the token (athclaim).- Parameters:
method- HTTP method of the request.uri- URI of the request.accessToken- value of the access token the request carries.- Returns:
- the serialized proof JWT.
- Throws:
IllegalStateException- if the proof cannot be signed.
-
withoutQuery
Removes the query and the fragment, whichhtudoes not include.- Parameters:
uri- the URI of the request.- Returns:
- the URI as the proof states it.
-