-
Notifications
You must be signed in to change notification settings - Fork 171
feat: CTE delegation and impersonation support #975
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
26006d5
d6803d8
f567f06
acc44d1
e64383d
cb3e6f4
1dd7b94
14d14c2
7995cb7
f9d2c9a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -96,4 +96,7 @@ gen-external-apklibs | |
| .TemporaryItems | ||
| .Trashes | ||
|
|
||
| version.txt | ||
| version.txt | ||
|
|
||
| # Internal planning docs | ||
| plans/ | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| package com.auth0.android.authentication.request | ||
|
|
||
| /** | ||
| * Represents the acting party in a token exchange delegation/impersonation flow. | ||
| * | ||
| * An `ActorToken` bundles the token and its type URI together, ensuring both are always provided as required by | ||
| * [RFC 8693](https://tools.ietf.org/html/rfc8693). Auth0 requires both `actor_token` and `actor_token_type` to be | ||
| * present when performing delegation. | ||
| * | ||
| * @param token The token representing the acting party (the entity performing actions on behalf of the subject). | ||
| * @param tokenType A URI indicating the type of the actor token (e.g., `urn:ietf:params:oauth:token-type:id_token` | ||
| * or a custom URI like `http://corporate-idp/id-token`). | ||
| * | ||
| * @see [RFC 8693: OAuth 2.0 Token Exchange](https://tools.ietf.org/html/rfc8693#section-2.1) | ||
| * @see [Custom Token Exchange Documentation](https://auth0.com/docs/authenticate/custom-token-exchange) | ||
| */ | ||
| public data class ActorToken( | ||
| val token: String, | ||
| val tokenType: String | ||
| ) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| package com.auth0.android.result | ||
|
|
||
| import java.io.Serializable | ||
|
|
||
| /** | ||
| * Represents the `act` (actor) claim in an ID token, used in delegation and impersonation scenarios. | ||
| * See RFC 8693 Section 4.4 for the specification of the `act` claim. | ||
| * | ||
| * @param sub The unique identifier of the actor (required). | ||
|
kishore7snehil marked this conversation as resolved.
|
||
| * @param actor A nested actor claim representing a delegation chain. | ||
| * @param extraProperties Additional custom properties set via the `setActor` Action command. | ||
| */ | ||
| public data class ActorClaim( | ||
| val sub: String, | ||
| val actor: ActorClaim? = null, | ||
| val extraProperties: Map<String, Any> = emptyMap() | ||
| ) : Serializable | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,7 +7,7 @@ import java.util.* | |
| * Class that holds the information of a user's profile in Auth0. | ||
| * Used both in [com.auth0.android.management.UsersAPIClient] and [com.auth0.android.authentication.AuthenticationAPIClient]. | ||
| */ | ||
| public class UserProfile( | ||
| public class UserProfile @JvmOverloads constructor( | ||
| private val id: String?, | ||
| public val name: String?, | ||
| public val nickname: String?, | ||
|
|
@@ -25,7 +25,13 @@ public class UserProfile( | |
| private val extraInfo: Map<String, Any>?, | ||
| private val userMetadata: Map<String, Any>?, | ||
| private val appMetadata: Map<String, Any>?, | ||
| public val givenName: String? | ||
| public val givenName: String?, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since UserProfiles constructor is public, adding a new parameter is a binary-breaking change for any Java callers that construct this directly (Kotlin handles it via the default value, but Java doesn't see default params). I know it's mostly constructed internally by the deserializer, but would it be worth adding @jvmoverloads here to generate the overloaded constructors for Java consumers? Or alternatively, a secondary constructor without actor for backward compat
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
| /** | ||
| * The actor claim from the ID token, representing the acting party in delegation | ||
| * or impersonation scenarios (e.g., an AI agent acting on behalf of a user). | ||
| * Only present when the token was issued via Custom Token Exchange with an actor. | ||
| */ | ||
| public val actor: ActorClaim? = null | ||
| ) : Serializable { | ||
|
|
||
| /** | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.