Skip to content

Token requests should be customizable #307

@jimmyjames

Description

@jimmyjames

Description

There are times when it is required to send custom headers or parameters on authorization requests. For example, the auth0-forwarded-for header is recommended to avoid a common issue with anomaly detection, which is discussed further in #302

Some background:

  • AuthRequest extends Request
  • AuthRequest does not extend CustomizableRequest
  • TokenRequest is the only implementor of AuthRequest
  • TokenRequest does extend CustomizableRequest, which allows setting custom headers, parameters, and body.

Rather than chase these issues continuously, instead we should resolve this issue for the specific issue raised in #302, as well as for other needs to configure the request.

Reproduction

Call any API that returns an AuthRequest, and note that the request cannot be customized without downcasting to TokenRequest or CustomizableRequest.

Environment

auth0-java version 1.23.0

Metadata

Metadata

Assignees

Labels

enhancementAn enhancement or improvement to the SDK that could not be otherwise categorized as a new feature

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions