Reference documentation and code samples for the googleauth class Google::Auth::UserRefreshCredentials.
Authenticates requests using User Refresh credentials.
This class allows authorizing requests from user refresh tokens.
This the end of the result of a 3LO flow. E.g, the end result of 'gcloud auth login' saves a file with these contents in well known location
Inherits
Extended By
Methods
.make_creds
def self.make_creds(options = {})
Create a UserRefreshCredentials.
- json_key_io (IO) — an IO from which the JSON key can be read
- scope (string|array|nil) — the scope(s) to access
.read_json_key
def self.read_json_key(json_key_io)
Reads the client_id, client_secret and refresh_token fields from the JSON key.
#includes_scope?
def includes_scope?(required_scope) -> Boolean
Verifies that a credential grants the requested scope
- required_scope (Array<String>, String) — Scope to verify
- (Boolean) — True if scope is granted
#initialize
def initialize(options = {}) -> UserRefreshCredentials
- (UserRefreshCredentials) — a new instance of UserRefreshCredentials
#project_id
def project_id()
Returns the value of attribute project_id.
#quota_project_id
def quota_project_id()
Returns the value of attribute quota_project_id.
#revoke!
def revoke!(options = {})
Revokes the credential