Class PopTokenRequestContext

java.lang.Object
com.azure.core.credential.TokenRequestContext
com.azure.core.experimental.credential.PopTokenRequestContext

public final class PopTokenRequestContext extends TokenRequestContext
The context for a Proof of Possession token request.
  • Constructor Details

    • PopTokenRequestContext

      public PopTokenRequestContext()
      Creates a new instance of the PopTokenRequestContext.
  • Method Details

    • addScopes

      public PopTokenRequestContext addScopes(String... scopes)
      Adds scopes required for the token.
      Overrides:
      addScopes in class TokenRequestContext
      Parameters:
      scopes - The scopes required for the token.
      Returns:
      The updated PopTokenRequestContext object.
    • setClaims

      public PopTokenRequestContext setClaims(String claims)
      Sets the scopes required for the token.
      Overrides:
      setClaims in class TokenRequestContext
      Parameters:
      claims - The claims required for the token.
      Returns:
      The updated PopTokenRequestContext object.
    • setTenantId

      public PopTokenRequestContext setTenantId(String tenantId)
      Sets the scopes required for the token.
      Overrides:
      setTenantId in class TokenRequestContext
      Parameters:
      tenantId - The tenant id.
      Returns:
      The updated PopTokenRequestContext object.
    • setCaeEnabled

      public PopTokenRequestContext setCaeEnabled(boolean caeEnabled)
      Sets the scopes required for the token.
      Overrides:
      setCaeEnabled in class TokenRequestContext
      Parameters:
      caeEnabled - Whether the client is enabled for Certificate Authority Encryption.
      Returns:
      The updated PopTokenRequestContext object.
    • setProofOfPossessionNonce

      public PopTokenRequestContext setProofOfPossessionNonce(String proofOfPossessionNonce)
      Sets the scopes required for the token.
      Parameters:
      proofOfPossessionNonce - The proof of possession nonce.
      Returns:
      The updated PopTokenRequestContext object.
    • getClaims

      public String getClaims()
      Gets the claims required for the token.
      Overrides:
      getClaims in class TokenRequestContext
      Returns:
      The claims required for the token.
    • getTenantId

      public String getTenantId()
      Gets the tenant id.
      Overrides:
      getTenantId in class TokenRequestContext
      Returns:
      The tenant id.
    • isCaeEnabled

      public boolean isCaeEnabled()
      Gets whether the client is enabled for Certificate Authority Encryption.
      Overrides:
      isCaeEnabled in class TokenRequestContext
      Returns:
      Whether the client is enabled for Certificate Authority Encryption.
    • getProofOfPossessionNonce

      public String getProofOfPossessionNonce()
      Gets the proof of possession nonce.
      Returns:
      The proof of possession nonce.
    • getResourceRequestMethod

      public String getResourceRequestMethod()
      Gets the HTTP method.
      Returns:
      The HTTP method.
    • setResourceRequestMethod

      public PopTokenRequestContext setResourceRequestMethod(HttpMethod resourceRequestMethod)
      Sets the HTTP method for the resource.
      Parameters:
      resourceRequestMethod - the HTTP method to set
      Returns:
      The updated PopTokenRequestContext
    • getResourceRequestUrl

      public URL getResourceRequestUrl()
      Gets the Request resource URL for PoP authentication flow.
      Returns:
      The URL.
    • setResourceRequestUrl

      public PopTokenRequestContext setResourceRequestUrl(URL resourceRequestUrl)
      Sets the Request resource URL for PoP authentication flow.
      Parameters:
      resourceRequestUrl - the request URL to set.
      Returns:
      The updated PopTokenRequestContext.
    • setProofOfPossessionEnabled

      public TokenRequestContext setProofOfPossessionEnabled(boolean enableProofOfPossession)
      Sets the proof of possession enabled flag.
      Parameters:
      enableProofOfPossession - the flag indicating whether proof of possession is enabled or not.
      Returns:
      the current instance of TokenRequestContext.
    • isProofOfPossessionEnabled

      public boolean isProofOfPossessionEnabled()
      Checks if the proof of possession is enabled.
      Returns:
      true if the proof of possession is enabled, false otherwise.