Package io.grpc.auth
Class GoogleAuthLibraryCallCredentials.JwtHelper
- java.lang.Object
-
- io.grpc.auth.GoogleAuthLibraryCallCredentials.JwtHelper
-
- Enclosing class:
- GoogleAuthLibraryCallCredentials
static class GoogleAuthLibraryCallCredentials.JwtHelper extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.reflect.Method
build
private java.lang.reflect.Method
getScopes
private java.util.List<GoogleAuthLibraryCallCredentials.MethodPair>
methodPairs
private java.lang.reflect.Method
newJwtBuilder
private java.lang.Class<? extends com.google.auth.Credentials>
serviceAccountClass
-
Constructor Summary
Constructors Constructor Description JwtHelper(java.lang.Class<?> rawServiceAccountClass, java.lang.ClassLoader loader)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.google.auth.Credentials
tryServiceAccountToJwt(com.google.auth.Credentials creds)
This method tries to convert aCredentials
object to a ServiceAccountJwtAccessCredentials.
-
-
-
Field Detail
-
serviceAccountClass
private final java.lang.Class<? extends com.google.auth.Credentials> serviceAccountClass
-
newJwtBuilder
private final java.lang.reflect.Method newJwtBuilder
-
build
private final java.lang.reflect.Method build
-
getScopes
private final java.lang.reflect.Method getScopes
-
methodPairs
private final java.util.List<GoogleAuthLibraryCallCredentials.MethodPair> methodPairs
-
-
Method Detail
-
tryServiceAccountToJwt
public com.google.auth.Credentials tryServiceAccountToJwt(com.google.auth.Credentials creds)
This method tries to convert aCredentials
object to a ServiceAccountJwtAccessCredentials. The original credentials will be returned if:- The Credentials is not a ServiceAccountCredentials
- The ServiceAccountCredentials has scopes
- Something unexpected happens
- Parameters:
creds
- the Credentials to convert- Returns:
- either the original Credentials or a fully formed ServiceAccountJwtAccessCredentials.
-
-