AppIdentityService
class AppIdentityService (View source)
The AppIdentityService allows you to sign arbitrary byte array using per app private key maintained by App Engine. You can also retrieve a list of public certificates which can be used to verify the signature.
App Engine is responsible for maintaining per-application private key. App Engine will keep rotating private keys periodically. App Engine never releases these private keys externally.
Since private keys are rotated periodically, getPublicCertificates() could return a list of public certificates. It's the caller's responsibility to try these certificates one by one when doing signature verification.
Constants
PACKAGE_NAME |
|
PARTITION_SEPARATOR |
|
DOMAIN_SEPARATOR |
|
MEMCACHE_KEY_PREFIX |
|
EXPIRY_SAFETY_MARGIN_SECS |
|
EXPIRY_SHORT_MARGIN_SECS |
|
Methods
Signs arbitrary byte array using per app private key.
Get the service account name for the application.
Get the list of public certifates for the application.
Gets an OAuth2 access token for the application's service account from the cache or generates and caches one by calling getAccessTokenUncached($scopes)
Get the application id of an app.
Get the standard hostname of the default version of the app.
Details
at line 74
static array
signForApp(string $bytes_to_sign)
Signs arbitrary byte array using per app private key.
at line 104
static string
getServiceAccountName()
Get the service account name for the application.
at line 127
static PublicCertificate[]
getPublicCertificates()
Get the list of public certifates for the application.
at line 169
static array
getAccessToken(array $scopes)
Gets an OAuth2 access token for the application's service account from the cache or generates and caches one by calling getAccessTokenUncached($scopes)
Each application has an associated Google account. This function returns OAuth2 access token corresponding to the running app. Access tokens are safe to cache and reuse until they expire.
at line 247
static string
getApplicationId()
Get the application id of an app.
at line 259
static string
getDefaultVersionHostname()
Get the standard hostname of the default version of the app.