Package org.teiid.google.v4
Class OAuth2HeaderFactory
- java.lang.Object
-
- org.teiid.google.v4.OAuth2HeaderFactory
-
- All Implemented Interfaces:
AuthHeaderFactory
public class OAuth2HeaderFactory extends Object implements AuthHeaderFactory
-
-
Constructor Summary
Constructors Constructor Description OAuth2HeaderFactory(String refreshToken, String clientId, String clientSecret)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getAuthHeader()
com.google.api.client.googleapis.auth.oauth2.GoogleCredential
getCredential()
void
refreshToken()
Gets the authorization header.
-
-
-
Method Detail
-
refreshToken
public void refreshToken()
Description copied from interface:AuthHeaderFactory
Gets the authorization header. Typically performs the login (interaction with google services). Should be called only when necessary (first login, google session expires)- Specified by:
refreshToken
in interfaceAuthHeaderFactory
-
getAuthHeader
public String getAuthHeader()
- Specified by:
getAuthHeader
in interfaceAuthHeaderFactory
-
getCredential
public com.google.api.client.googleapis.auth.oauth2.GoogleCredential getCredential()
-
-