AuthTokenContext
Stay organized with collections
Save and categorize content based on your preferences.
AuthTokenContext contains information needed to mint JWT tokens.
Public Constructor Summary
Inherited Method Summary
From class java.lang.Object
Object
|
clone()
|
boolean |
|
void |
finalize()
|
final Class<?>
|
getClass()
|
int |
hashCode()
|
final void |
notify()
|
final void |
notifyAll()
|
String
|
toString()
|
final void |
wait(long arg0, int arg1)
|
final void |
wait(long arg0)
|
final void |
wait()
|
Public Constructors
public AuthTokenContext ()
Public Methods
public abstract String getTripId ()
When provided, TripId should be included as a private claim when minting the JWT
token.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-27 UTC.
[null,null,["Last updated 2025-08-27 UTC."],[[["\u003cp\u003e\u003ccode\u003eAuthTokenContext\u003c/code\u003e stores necessary information for creating JWT tokens.\u003c/p\u003e\n"],["\u003cp\u003eIt includes a \u003ccode\u003eTripId\u003c/code\u003e field that can be included as a private claim in the JWT.\u003c/p\u003e\n"],["\u003cp\u003eA builder class (\u003ccode\u003eAuthTokenContext.Builder\u003c/code\u003e) is provided for constructing \u003ccode\u003eAuthTokenContext\u003c/code\u003e instances.\u003c/p\u003e\n"]]],["`AuthTokenContext` is an abstract class used to manage data for creating JWT tokens. It contains a nested `AuthTokenContext.Builder` for creating instances. The `builder()` method provides a new `AuthTokenContext.Builder`. The `getTripId()` method, when implemented, provides the TripId, which should be incorporated as a private claim in the generated JWT token. `AuthTokenContext` is used to include necessary information when creating tokens.\n"],null,["# AuthTokenContext\n\npublic abstract class **AuthTokenContext** extends [Object](//developer.android.com/reference/java/lang/Object.html) \nAuthTokenContext contains information needed to mint JWT tokens. \n\n### Nested Class Summary\n\n|-------|---|---|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| class | [AuthTokenContext.Builder](/maps/documentation/mobility/journey-sharing/on-demand/reference/consumer_2/android/reference/com/google/android/libraries/mapsplatform/transportation/consumer/auth/AuthTokenContext.Builder) || Builder for [AuthTokenContext](/maps/documentation/mobility/journey-sharing/on-demand/reference/consumer_2/android/reference/com/google/android/libraries/mapsplatform/transportation/consumer/auth/AuthTokenContext). |\n\n### Public Constructor Summary\n\n|---|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| | [AuthTokenContext](/maps/documentation/mobility/journey-sharing/on-demand/reference/consumer_2/android/reference/com/google/android/libraries/mapsplatform/transportation/consumer/auth/AuthTokenContext#AuthTokenContext())() |\n\n### Public Method Summary\n\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| static [AuthTokenContext.Builder](/maps/documentation/mobility/journey-sharing/on-demand/reference/consumer_2/android/reference/com/google/android/libraries/mapsplatform/transportation/consumer/auth/AuthTokenContext.Builder) | [builder](/maps/documentation/mobility/journey-sharing/on-demand/reference/consumer_2/android/reference/com/google/android/libraries/mapsplatform/transportation/consumer/auth/AuthTokenContext#builder())() Returns a new [AuthTokenContext.Builder](/maps/documentation/mobility/journey-sharing/on-demand/reference/consumer_2/android/reference/com/google/android/libraries/mapsplatform/transportation/consumer/auth/AuthTokenContext.Builder) for [AuthTokenContext](/maps/documentation/mobility/journey-sharing/on-demand/reference/consumer_2/android/reference/com/google/android/libraries/mapsplatform/transportation/consumer/auth/AuthTokenContext). |\n| abstract [String](//developer.android.com/reference/java/lang/String.html) | [getTripId](/maps/documentation/mobility/journey-sharing/on-demand/reference/consumer_2/android/reference/com/google/android/libraries/mapsplatform/transportation/consumer/auth/AuthTokenContext#getTripId())() When provided, TripId should be included as a private claim when minting the JWT token. |\n\n### Inherited Method Summary\n\nFrom class java.lang.Object \n\n|----------------------------------------------------------------------------|--------------------------------------------------------------------------------|\n| [Object](//developer.android.com/reference/java/lang/Object.html) | clone() |\n| boolean | equals([Object](//developer.android.com/reference/java/lang/Object.html) arg0) |\n| void | finalize() |\n| final [Class](//developer.android.com/reference/java/lang/Class.html)\\\u003c?\\\u003e | getClass() |\n| int | hashCode() |\n| final void | notify() |\n| final void | notifyAll() |\n| [String](//developer.android.com/reference/java/lang/String.html) | toString() |\n| final void | wait(long arg0, int arg1) |\n| final void | wait(long arg0) |\n| final void | wait() |\n\nPublic Constructors\n-------------------\n\n#### public **AuthTokenContext** ()\n\nPublic Methods\n--------------\n\n#### public static [AuthTokenContext.Builder](/maps/documentation/mobility/journey-sharing/on-demand/reference/consumer_2/android/reference/com/google/android/libraries/mapsplatform/transportation/consumer/auth/AuthTokenContext.Builder) **builder**\n()\n\nReturns a new [AuthTokenContext.Builder](/maps/documentation/mobility/journey-sharing/on-demand/reference/consumer_2/android/reference/com/google/android/libraries/mapsplatform/transportation/consumer/auth/AuthTokenContext.Builder) for [AuthTokenContext](/maps/documentation/mobility/journey-sharing/on-demand/reference/consumer_2/android/reference/com/google/android/libraries/mapsplatform/transportation/consumer/auth/AuthTokenContext). \n\n#### public abstract [String](//developer.android.com/reference/java/lang/String.html) **getTripId** ()\n\nWhen provided, TripId should be included as a private claim when minting the JWT\ntoken."]]