public final class CredentialFromAccessTokenProviderClassFactory extends Object
AccessTokenProviderClassFromConfigFactory
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(AccessTokenProviderClassFromConfigFactory providerClassFactory,
org.apache.hadoop.conf.Configuration config,
Collection<String> scopes)
Generate the credential.
|
static com.google.api.client.auth.oauth2.Credential |
credential(AccessTokenProvider accessTokenProvider,
Collection<String> scopes)
Generate the credential from the
AccessTokenProvider . |
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(AccessTokenProviderClassFromConfigFactory providerClassFactory, org.apache.hadoop.conf.Configuration config, Collection<String> scopes) throws IOException, GeneralSecurityException
If the AccessTokenProviderClassFromConfigFactory
generates no Class for the
provider, return null.
IOException
GeneralSecurityException
Copyright © 2020. All rights reserved.