Module: Spearly::Auth::Token
- Included in:
- Client
- Defined in:
- lib/spearly/auth/token.rb
Instance Method Summary collapse
-
#get_token_info ⇒ Object
GET /oauth/token/info.
-
#get_tokens(params) ⇒ Object
GET /oauth/tokens.
-
#revoke_token(params) ⇒ Object
POST /oauth/revoke.
Instance Method Details
#get_token_info ⇒ Object
GET /oauth/token/info
7 8 9 10 11 12 13 14 |
# File 'lib/spearly/auth/token.rb', line 7 def get_token_info response = run_request( :method => :get, path: '/oauth/token/info' ) process_response(response) end |
#get_tokens(params) ⇒ Object
GET /oauth/tokens
30 31 32 33 34 35 36 37 38 |
# File 'lib/spearly/auth/token.rb', line 30 def get_tokens(params) response = run_request( :method => :get, path: '/oauth/tokens', params: params ) process_response(response) end |
#revoke_token(params) ⇒ Object
POST /oauth/revoke
17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/spearly/auth/token.rb', line 17 def revoke_token(params) params[:token] = @token.gsub(/^Bearer /i, '') response = run_request( :method => :post, path: '/oauth/revoke', params: params ) process_response(response) end |