Interface OAuth2AuthorizationData.Builder

  • Method Details

    • authorizationUrl

      OAuth2AuthorizationData.Builder authorizationUrl(String authorizationUrl)

      The URL that the user opens to approve access. The link is valid for up to 10 minutes. Treat it as sensitive and give it only to the user who approves access.

      Parameters:
      authorizationUrl - The URL that the user opens to approve access. The link is valid for up to 10 minutes. Treat it as sensitive and give it only to the user who approves access.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • userId

      The AgentCore Identity user ID that the authorization is for. Store it with your signed-in user and pass it as userIdentifier.userId when your application calls CompleteResourceTokenAuth.

      Parameters:
      userId - The AgentCore Identity user ID that the authorization is for. Store it with your signed-in user and pass it as userIdentifier.userId when your application calls CompleteResourceTokenAuth.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • authorizationAttemptId

      OAuth2AuthorizationData.Builder authorizationAttemptId(String authorizationAttemptId)

      The identifier of this authorization attempt.

      Parameters:
      authorizationAttemptId - The identifier of this authorization attempt.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • expiresAt

      The timestamp when the authorization link expires, 10 minutes after the authorization started. A request that joins an authorization in progress gets less time, and the link might stop working shortly before this time.

      Parameters:
      expiresAt - The timestamp when the authorization link expires, 10 minutes after the authorization started. A request that joins an authorization in progress gets less time, and the link might stop working shortly before this time.
      Returns:
      Returns a reference to this object so that method calls can be chained together.