Package com.inrupt.client.auth
Interface DPoP
public interface DPoP
An abstraction for working with OAuth 2.0 Demonstrating Proof-of-Possession at the Application Layer (DPoP).
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionReturn a collection of the supported algorithm names.generateProof
(String algorithm, URI uri, String method) Generate a DPoP proof for a given URI and method pair.lookupAlgorithm
(String jkt) Retrieve the algorithm for the given thumbprint, if available.lookupThumbprint
(String algorithm) Retrieve the thumbprint for a given algorithm, if available.static DPoP
of()
Create a DPoP manager that supports a default keypair.static DPoP
Create a DPoP manager that supports some number of keypairs.
-
Method Details
-
generateProof
Generate a DPoP proof for a given URI and method pair.- Parameters:
algorithm
- the algorithm to useuri
- the HTTP URImethod
- the HTTP method- Returns:
- the DPoP Proof, serialized as a Base64-encoded string, suitable for use with HTTP headers
-
algorithms
Return a collection of the supported algorithm names.- Returns:
- the algorithm names
-
lookupAlgorithm
Retrieve the algorithm for the given thumbprint, if available.- Parameters:
jkt
- the JSON Key Thumbprint- Returns:
- the algorithm, if present
-
lookupThumbprint
Retrieve the thumbprint for a given algorithm, if available.- Parameters:
algorithm
- the algorithm- Returns:
- the thumbprint, if present
-
of
Create a DPoP manager that supports a default keypair.- Returns:
- the DPoP manager
-
of
Create a DPoP manager that supports some number of keypairs.- Parameters:
keypairs
- the keypairs- Returns:
- the DPoP manager
-