Class: Koinz::OAuth2Client::UserManager
- Inherits:
-
Object
- Object
- Koinz::OAuth2Client::UserManager
- Defined in:
- lib/koinz/omniauth_client.rb
Class Method Summary collapse
-
.call(access_token, uri, options = {}) ⇒ Object
Example: Koinz::OAuth2::UserManager.call(@user_session.auth_token, ‘/users/sign_out.json’).
Class Method Details
.call(access_token, uri, options = {}) ⇒ Object
Example:
Koinz::OAuth2::UserManager.call(@user_session.auth_token, '/users/sign_out.json')
15 16 17 18 19 20 21 22 23 |
# File 'lib/koinz/omniauth_client.rb', line 15 def self.call(access_token, uri, = {}) access_token = OAuth2::AccessToken.new($KOINZ_PROVIDER.client, access_token ) method = .fetch(:method, :get) result = access_token.send(method, uri) result = MultiJson.decode(result) rescue Exception => e return { :error => e. } end |