Class: Redd::AuthStrategies::Userless

Inherits:
AuthStrategy show all
Defined in:
lib/redd/auth_strategies/userless.rb

Overview

A userless authentication scheme.

Constant Summary

Constants inherited from AuthStrategy

AuthStrategy::AUTH_ENDPOINT

Constants inherited from Client

Client::USER_AGENT

Instance Method Summary collapse

Methods inherited from AuthStrategy

#initialize, #revoke

Methods inherited from Client

#delete, #get, #initialize, #patch, #post, #put, #request

Constructor Details

This class inherits a constructor from Redd::AuthStrategies::AuthStrategy

Instance Method Details

#authenticateAccess

Perform authentication and return the resulting access object


11
12
13
# File 'lib/redd/auth_strategies/userless.rb', line 11

def authenticate
  request_access('client_credentials')
end

#refresh(_) ⇒ Access

Refresh the authentication and return the refreshed access


17
18
19
# File 'lib/redd/auth_strategies/userless.rb', line 17

def refresh(_)
  authenticate
end