public final class CredentialFromAccessTokenProviderClassFactory extends Object
HadoopCredentialConfiguration.getAccessTokenProviderImplClass(Configuration,
String...)
and a Hadoop Configuration
, generate a Credential
.Constructor and Description |
---|
CredentialFromAccessTokenProviderClassFactory() |
Modifier and Type | Method and Description |
---|---|
static com.google.api.client.auth.oauth2.Credential |
credential(AccessTokenProvider accessTokenProvider,
Collection<String> scopes)
Generate the credential from the
AccessTokenProvider . |
static com.google.api.client.auth.oauth2.Credential |
credential(org.apache.hadoop.conf.Configuration config,
List<String> keyPrefixes,
Collection<String> scopes)
Generate the credential.
|
public CredentialFromAccessTokenProviderClassFactory()
public static com.google.api.client.auth.oauth2.Credential credential(AccessTokenProvider accessTokenProvider, Collection<String> scopes) throws IOException, GeneralSecurityException
AccessTokenProvider
.IOException
GeneralSecurityException
public static com.google.api.client.auth.oauth2.Credential credential(org.apache.hadoop.conf.Configuration config, List<String> keyPrefixes, Collection<String> scopes) throws IOException, GeneralSecurityException
If the HadoopCredentialConfiguration.getAccessTokenProviderImplClass(Configuration,
String...)
generates no Class for the provider, return null
.
IOException
GeneralSecurityException
Copyright © 2021. All rights reserved.