ServiceAccountKey class

Represents a service account key.

A service account has two sets of key-pairs: user-managed, and system-managed. User-managed key-pairs can be created and deleted by users. Users are responsible for rotating these keys periodically to ensure security of their service accounts. Users retain the private key of these key-pairs, and Google retains ONLY the public key. System-managed keys are automatically rotated by Google, and are used for signing for a maximum of two weeks. The rotation process is probabilistic, and usage of the new key will gradually ramp up and down over the key's lifetime. If you cache the public key set for a service account, we recommend that you update the cache every 15 minutes. User-managed keys can be added and removed at any time, so it is important to update the cache frequently. For Google-managed keys, Google will publish a key at least 6 hours before it is first used for signing and will keep publishing it for at least 6 hours after it was last used for signing. Public keys for all service accounts are also published at the OAuth2 Service Account API.

Constructors

ServiceAccountKey({bool? disabled, String? keyAlgorithm, String? keyOrigin, String? keyType, String? name, String? privateKeyData, String? privateKeyType, String? publicKeyData, String? validAfterTime, String? validBeforeTime})
ServiceAccountKey.fromJson(Map json_)

Properties

disabled bool?
The key status.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
keyAlgorithm String?
Specifies the algorithm (and possibly key size) for the key. Possible string values are:
getter/setter pair
keyOrigin String?
The key origin. Possible string values are:
getter/setter pair
keyType String?
The key type. Possible string values are:
getter/setter pair
name String?
The resource name of the service account key in the following format projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}.
getter/setter pair
privateKeyData String?
The private key data.
getter/setter pair
privateKeyDataAsBytes List<int>
getter/setter pair
privateKeyType String?
The output format for the private key.
getter/setter pair
publicKeyData String?
The public key data.
getter/setter pair
publicKeyDataAsBytes List<int>
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
validAfterTime String?
The key can be used after this timestamp.
getter/setter pair
validBeforeTime String?
The key can be used before this timestamp.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited