Class DefaultDPoPProofFactory

java.lang.Object
com.nimbusds.oauth2.sdk.dpop.DefaultDPoPProofFactory
All Implemented Interfaces:
DPoPProofFactory

public class DefaultDPoPProofFactory extends Object implements DPoPProofFactory
Default DPoP proof factory.
  • Constructor Details

    • DefaultDPoPProofFactory

      public DefaultDPoPProofFactory(com.nimbusds.jose.jwk.JWK jwk, com.nimbusds.jose.JWSAlgorithm jwsAlg) throws com.nimbusds.jose.JOSEException
      Creates a new DPoP proof factory using the default JCA provider.
      Parameters:
      jwk - The signing JWK. Must not be null.
      jwsAlg - The signing JWS algorithm. Must not be null.
      Throws:
      com.nimbusds.jose.JOSEException - If signer creation failed.
    • DefaultDPoPProofFactory

      public DefaultDPoPProofFactory(com.nimbusds.jose.jwk.JWK jwk, com.nimbusds.jose.JWSAlgorithm jwsAlg, Provider jcaProvider) throws com.nimbusds.jose.JOSEException
      Creates a new DPoP proof factory.
      Parameters:
      jwk - The signing JWK. Must not be null.
      jwsAlg - The signing JWS algorithm. Must not be null.
      jcaProvider - The JCA provider to use for signing, null to use the default.
      Throws:
      com.nimbusds.jose.JOSEException - If signer creation failed.
  • Method Details

    • getPublicJWK

      public com.nimbusds.jose.jwk.JWK getPublicJWK()
      Returns the configured public signing JWK.
      Returns:
      The public signing JWK.
    • getJWSAlgorithm

      public com.nimbusds.jose.JWSAlgorithm getJWSAlgorithm()
      Returns the configured JWS algorithm.
      Returns:
      The JWS algorithm.
    • getJWSSigner

      public com.nimbusds.jose.JWSSigner getJWSSigner()
      Returns the JWS signer.
      Returns:
      The JWS signer.
    • createDPoPJWT

      public com.nimbusds.jwt.SignedJWT createDPoPJWT(String htm, URI htu) throws com.nimbusds.jose.JOSEException
      Description copied from interface: DPoPProofFactory
      Creates a new DPoP proof.
      Specified by:
      createDPoPJWT in interface DPoPProofFactory
      Parameters:
      htm - The HTTP request method. Must not be null.
      htu - The HTTP URI, without a query or fragment. Must not be null.
      Returns:
      The signed DPoP JWT.
      Throws:
      com.nimbusds.jose.JOSEException - If signing failed.
    • createDPoPJWT

      public com.nimbusds.jwt.SignedJWT createDPoPJWT(String htm, URI htu, Nonce nonce) throws com.nimbusds.jose.JOSEException
      Description copied from interface: DPoPProofFactory
      Creates a new DPoP proof.
      Specified by:
      createDPoPJWT in interface DPoPProofFactory
      Parameters:
      htm - The HTTP request method. Must not be null.
      htu - The HTTP URI, without a query or fragment. Must not be null.
      nonce - The nonce, null if not specified.
      Returns:
      The signed DPoP JWT.
      Throws:
      com.nimbusds.jose.JOSEException - If signing failed.
    • createDPoPJWT

      public com.nimbusds.jwt.SignedJWT createDPoPJWT(String htm, URI htu, AccessToken accessToken) throws com.nimbusds.jose.JOSEException
      Description copied from interface: DPoPProofFactory
      Creates a new DPoP proof.
      Specified by:
      createDPoPJWT in interface DPoPProofFactory
      Parameters:
      htm - The HTTP request method. Must not be null.
      htu - The HTTP URI, without a query or fragment. Must not be null.
      accessToken - The access token for the access token hash ("ath") claim computation, null if not specified.
      Returns:
      The signed DPoP JWT.
      Throws:
      com.nimbusds.jose.JOSEException - If signing failed.
    • createDPoPJWT

      public com.nimbusds.jwt.SignedJWT createDPoPJWT(String htm, URI htu, AccessToken accessToken, Nonce nonce) throws com.nimbusds.jose.JOSEException
      Description copied from interface: DPoPProofFactory
      Creates a new DPoP proof.
      Specified by:
      createDPoPJWT in interface DPoPProofFactory
      Parameters:
      htm - The HTTP request method. Must not be null.
      htu - The HTTP URI, without a query or fragment. Must not be null.
      accessToken - The access token for the access token hash ("ath") claim computation, null if not specified.
      nonce - The nonce, null if not specified.
      Returns:
      The signed DPoP JWT.
      Throws:
      com.nimbusds.jose.JOSEException - If signing failed.
    • createDPoPJWT

      public com.nimbusds.jwt.SignedJWT createDPoPJWT(JWTID jti, String htm, URI htu, Date iat, AccessToken accessToken) throws com.nimbusds.jose.JOSEException
      Description copied from interface: DPoPProofFactory
      Creates a new DPoP proof.
      Specified by:
      createDPoPJWT in interface DPoPProofFactory
      Parameters:
      jti - The JWT ID. Must not be null.
      htm - The HTTP request method. Must not be null.
      htu - The HTTP URI, without a query or fragment. Must not be null.
      iat - The issue time. Must not be null.
      accessToken - The access token for the access token hash ("ath") claim computation, null if not specified.
      Returns:
      The signed DPoP JWT.
      Throws:
      com.nimbusds.jose.JOSEException - If signing failed.
    • createDPoPJWT

      public com.nimbusds.jwt.SignedJWT createDPoPJWT(JWTID jti, String htm, URI htu, Date iat, AccessToken accessToken, Nonce nonce) throws com.nimbusds.jose.JOSEException
      Description copied from interface: DPoPProofFactory
      Creates a new DPoP proof.
      Specified by:
      createDPoPJWT in interface DPoPProofFactory
      Parameters:
      jti - The JWT ID. Must not be null.
      htm - The HTTP request method. Must not be null.
      htu - The HTTP URI, without a query or fragment. Must not be null.
      iat - The issue time. Must not be null.
      accessToken - The access token for the access token hash ("ath") claim computation, null if not specified.
      nonce - The nonce, null if not specified.
      Returns:
      The signed DPoP JWT.
      Throws:
      com.nimbusds.jose.JOSEException - If signing failed.