Class DPoPProofContext

java.lang.Object
org.springframework.security.oauth2.jwt.DPoPProofContext

public final class DPoPProofContext extends Object
A context class that holds a DPoP Proof Jwt and additional parameters associated to an Access Token request or a Protected Resource request.
Since:
6.5
See Also:
  • Method Details

    • getDPoPProof

      public String getDPoPProof()
      Returns the DPoP Proof Jwt.
      Returns:
      the DPoP Proof Jwt
    • getMethod

      public String getMethod()
      Returns the value of the HTTP method of the request to which the DPoP Proof Jwt is attached.
      Returns:
      the value of the HTTP method of the request to which the DPoP Proof Jwt is attached
    • getTargetUri

      public String getTargetUri()
      Returns the value of the HTTP target URI of the request to which the DPoP Proof Jwt is attached, without query and fragment parts.
      Returns:
      the value of the HTTP target URI of the request to which the DPoP Proof Jwt is attached
    • getAccessToken

      @Nullable public <T extends OAuth2Token> T getAccessToken()
      Returns the access token if the request is a Protected Resource request.
      Type Parameters:
      T - the type of the access token
      Returns:
      the access token if the request is a Protected Resource request or null
    • withDPoPProof

      public static DPoPProofContext.Builder withDPoPProof(String dPoPProof)
      Returns a new DPoPProofContext.Builder, initialized with the DPoP Proof Jwt.
      Parameters:
      dPoPProof - the DPoP Proof Jwt
      Returns:
      the DPoPProofContext.Builder