Class JsonKey
java.lang.Object
java.util.AbstractMap<String,Object>
com.google.api.client.util.GenericData
com.google.api.client.json.GenericJson
com.google.jenkins.plugins.credentials.oauth.JsonKey
public final class JsonKey
extends com.google.api.client.json.GenericJson
The Google Developer Console provides private
keys for service accounts in two different ways. one of them is a .json file that can be
downloaded from the Google Developer Console.
The structure of this json file is:
{
"private_key":"-----BEGIN PRIVATE KEY-----\n
...
\n-----END PRIVATE KEY-----\n",
"client_email":"...@developer.gserviceaccount.com",
...
}
-
Nested Class Summary
Nested classes/interfaces inherited from class com.google.api.client.util.GenericData
com.google.api.client.util.GenericData.Flags
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,
V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic JsonKey
load
(com.google.api.client.json.JsonFactory jsonFactory, InputStream inputStream) void
setClientEmail
(String clientEmail) void
setPrivateKey
(String privateKey) Methods inherited from class com.google.api.client.json.GenericJson
clone, getFactory, set, setFactory, toPrettyString, toString
Methods inherited from class com.google.api.client.util.GenericData
entrySet, equals, get, getClassInfo, getUnknownKeys, hashCode, put, putAll, remove, setUnknownKeys
Methods inherited from class java.util.AbstractMap
clear, containsKey, containsValue, isEmpty, keySet, size, values
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
JsonKey
public JsonKey()
-
-
Method Details
-
load
public static JsonKey load(com.google.api.client.json.JsonFactory jsonFactory, InputStream inputStream) throws IOException - Throws:
IOException
-
getClientEmail
-
setClientEmail
-
getPrivateKey
-
setPrivateKey
-