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 Details

    • generateProof

      String generateProof(String algorithm, URI uri, String method)
      Generate a DPoP proof for a given URI and method pair.
      Parameters:
      algorithm - the algorithm to use
      uri - the HTTP URI
      method - the HTTP method
      Returns:
      the DPoP Proof, serialized as a Base64-encoded string, suitable for use with HTTP headers
    • algorithms

      Set<String> algorithms()
      Return a collection of the supported algorithm names.
      Returns:
      the algorithm names
    • lookupAlgorithm

      Optional<String> lookupAlgorithm(String jkt)
      Retrieve the algorithm for the given thumbprint, if available.
      Parameters:
      jkt - the JSON Key Thumbprint
      Returns:
      the algorithm, if present
    • lookupThumbprint

      Optional<String> lookupThumbprint(String algorithm)
      Retrieve the thumbprint for a given algorithm, if available.
      Parameters:
      algorithm - the algorithm
      Returns:
      the thumbprint, if present
    • of

      static DPoP of()
      Create a DPoP manager that supports a default keypair.
      Returns:
      the DPoP manager
    • of

      static DPoP of(Map<String,KeyPair> keypairs)
      Create a DPoP manager that supports some number of keypairs.
      Parameters:
      keypairs - the keypairs
      Returns:
      the DPoP manager