C Specification
The XrGoogleCloudAuthInfoTokenANDROID structure is defined as:
// Provided by XR_ANDROID_google_cloud_auth
typedef struct XrGoogleCloudAuthInfoTokenANDROID {
XrStructureType type;
const void* next;
const char* authToken;
} XrGoogleCloudAuthInfoTokenANDROID;
Members
Description
When this structure is passed to xrSetGoogleCloudAuthAsyncANDROID, the
authToken member must be a nonempty ASCII string with no spaces or
control characters, otherwise the runtime must return
XR_ERROR_VALIDATION_FAILURE.
authToken must further satisfy the following conditions:
-
It must be a valid and unexpired credential generated for your Google Cloud project.
-
Your Google Cloud project must enable the relevant Google Cloud APIs (specified by the depending extensions).
-
The credential must be one of:
-
An OAuth2 access token with the relevant scopes, generated by signing into a Google account with your application, OR
-
A Signed JWT token with the relevant claims, generated by a Service Account from your Google Cloud project.
-
The requirements in each case are specified by the depending extensions.
Otherwise, the call to xrSetGoogleCloudAuthAsyncANDROID will succeed
but all calls to functions that depend on cloud authorization will act as
documented for cloud failures in the extension that defines those functions.
If such a function reports a failure and the application chains
XrGoogleCloudAuthErrorResultANDROID to the output parameter of that
function, the runtime must set
XrGoogleCloudAuthErrorResultANDROID::error to
XR_GOOGLE_CLOUD_AUTH_ERROR_ANDROID to indicate this error.
The application must proactively pass in a new token via
xrSetGoogleCloudAuthAsyncANDROID before the old token expires
otherwise the runtime must report XR_GOOGLE_CLOUD_AUTH_ERROR_ANDROID
via XrGoogleCloudAuthErrorResultANDROID from the functions that
require Google Cloud authentication.
The runtime must use the latest token passed in by the application when
starting a new network request.
The asynchronous operation will complete with XR_SUCCESS once the
token is validated for formatting and stored by the runtime.
The application does not need to keep authToken alive after the
function returns.
The runtime must make a copy of the authToken for its asynchronous
processing.
Document Notes
For more information, see the OpenXR Specification
This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.
Copyright
Copyright 2014-2026 The Khronos Group Inc.
This work is licensed under a Creative Commons Attribution 4.0 International License.