Uses of Class
com.google.api.client.auth.oauth2.Credential
Packages that use Credential
Package
Description
Implementation of the OAuth 2.0 Authorization
Framework.
OAuth 2.0 utilities that help simplify the authorization flow on Java 6.
OAuth 2.0 utilities that help simplify the authorization flow in HTTP servlets.
-
Uses of Credential in com.google.api.client.auth.oauth2
Methods in com.google.api.client.auth.oauth2 that return CredentialModifier and TypeMethodDescriptionCredential.Builder.build()
Returns a new credential instance.AuthorizationCodeFlow.createAndStoreCredential
(TokenResponse response, String userId) Creates a new credential for the given user ID based on the given token response and store in the credential store.AuthorizationCodeFlow.loadCredential
(String userId) Loads the credential of the given user ID from the credential store.private Credential
AuthorizationCodeFlow.newCredential
(String userId) Returns a new credential instance based on the given user ID.Credential.setAccessToken
(String accessToken) Sets the access token.Credential.setExpirationTimeMilliseconds
(Long expirationTimeMilliseconds) Sets the expected expiration time in milliseconds ornull
for none.Credential.setExpiresInSeconds
(Long expiresIn) Sets the lifetime in seconds of the access token (for example 3600 for an hour) ornull
for none.Credential.setFromTokenResponse
(TokenResponse tokenResponse) Sets theaccess token
,refresh token
(if available), andexpires-in time
based on the values from the token response.Credential.setRefreshToken
(String refreshToken) Sets the refresh token.Methods in com.google.api.client.auth.oauth2 with parameters of type CredentialModifier and TypeMethodDescriptionvoid
CredentialStore.delete
(String userId, Credential credential) Deprecated.Deletes the credential of the given user ID.boolean
CredentialStore.load
(String userId, Credential credential) Deprecated.Loads the credential for the given user ID.void
CredentialStoreRefreshListener.makePersistent
(Credential credential) Deprecated.Stores the updated credential in the credential store.void
DataStoreCredentialRefreshListener.makePersistent
(Credential credential) Stores the updated credential in the credential store.void
AuthorizationCodeFlow.CredentialCreatedListener.onCredentialCreated
(Credential credential, TokenResponse tokenResponse) Notifies of a created credential after a successful token response inAuthorizationCodeFlow.createAndStoreCredential(com.google.api.client.auth.oauth2.TokenResponse, java.lang.String)
.void
CredentialRefreshListener.onTokenErrorResponse
(Credential credential, TokenErrorResponse tokenErrorResponse) Notifies of an error token response fromrefreshToken()
.void
CredentialStoreRefreshListener.onTokenErrorResponse
(Credential credential, TokenErrorResponse tokenErrorResponse) Deprecated.void
DataStoreCredentialRefreshListener.onTokenErrorResponse
(Credential credential, TokenErrorResponse tokenErrorResponse) void
CredentialRefreshListener.onTokenResponse
(Credential credential, TokenResponse tokenResponse) Notifies of a successful token response fromrefreshToken()
.void
CredentialStoreRefreshListener.onTokenResponse
(Credential credential, TokenResponse tokenResponse) Deprecated.void
DataStoreCredentialRefreshListener.onTokenResponse
(Credential credential, TokenResponse tokenResponse) void
CredentialStore.store
(String userId, Credential credential) Deprecated.Stores the credential of the given user ID.Constructors in com.google.api.client.auth.oauth2 with parameters of type Credential -
Uses of Credential in com.google.api.client.extensions.java6.auth.oauth2
Methods in com.google.api.client.extensions.java6.auth.oauth2 that return CredentialModifier and TypeMethodDescriptionAuthorizes the installed application to access user's protected data.Methods in com.google.api.client.extensions.java6.auth.oauth2 with parameters of type CredentialModifier and TypeMethodDescriptionvoid
FileCredentialStore.delete
(String userId, Credential credential) Deprecated.boolean
FileCredentialStore.load
(String userId, Credential credential) Deprecated.(package private) void
FilePersistedCredential.load
(Credential credential) Deprecated.(package private) boolean
FilePersistedCredentials.load
(String userId, Credential credential) Deprecated.void
FileCredentialStore.store
(String userId, Credential credential) Deprecated.(package private) void
FilePersistedCredential.store
(Credential credential) Deprecated.Store information from the credential.(package private) void
FilePersistedCredentials.store
(String userId, Credential credential) Deprecated.Store information from the credential. -
Uses of Credential in com.google.api.client.extensions.servlet.auth.oauth2
Fields in com.google.api.client.extensions.servlet.auth.oauth2 declared as CredentialModifier and TypeFieldDescriptionprivate Credential
AbstractAuthorizationCodeServlet.credential
Persisted credential associated with the current request ornull
for none.Methods in com.google.api.client.extensions.servlet.auth.oauth2 that return CredentialModifier and TypeMethodDescriptionprotected final Credential
AbstractAuthorizationCodeServlet.getCredential()
Return the persisted credential associated with the current request ornull
for none.Methods in com.google.api.client.extensions.servlet.auth.oauth2 with parameters of type CredentialModifier and TypeMethodDescriptionprotected void
AbstractAuthorizationCodeCallbackServlet.onSuccess
(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, Credential credential) Handles a successfully granted authorization.