Module: Shutl::Auth
- Extended by:
- Auth
- Included in:
- Auth
- Defined in:
- lib/shutl_auth.rb,
lib/shutl/auth/version.rb,
lib/shutl/auth/access_token_request.rb,
lib/shutl/auth/authenticated_request.rb
Defined Under Namespace
Modules: AuthenticatedRequest Classes: Cache, InternalServerError, InvalidCredentials, InvalidUrl
Constant Summary collapse
- VERSION =
"0.8.4"
Instance Attribute Summary collapse
-
#client_id ⇒ Object
Returns the value of attribute client_id.
-
#client_secret ⇒ Object
Returns the value of attribute client_secret.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
- #access_token! ⇒ Object
- #access_token_response! ⇒ Object
- #config {|_self| ... } ⇒ Object
- #logger ⇒ Object
Instance Attribute Details
#client_id ⇒ Object
Returns the value of attribute client_id.
15 16 17 |
# File 'lib/shutl_auth.rb', line 15 def client_id @client_id end |
#client_secret ⇒ Object
Returns the value of attribute client_secret.
15 16 17 |
# File 'lib/shutl_auth.rb', line 15 def client_secret @client_secret end |
#url ⇒ Object
Returns the value of attribute url.
15 16 17 |
# File 'lib/shutl_auth.rb', line 15 def url @url end |
Instance Method Details
#access_token! ⇒ Object
8 9 10 |
# File 'lib/shutl/auth/access_token_request.rb', line 8 def access_token! access_token_response!.access_token end |
#access_token_response! ⇒ Object
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/shutl/auth/access_token_request.rb', line 12 def access_token_response! c = client Shutl::NetworkRetry.retry "Authentication Service Error" do handling_exceptions do Shutl::Auth.logger.debug "executing Rack::OAuth2::Client request" c.access_token! end end end |
#config {|_self| ... } ⇒ Object
17 18 19 |
# File 'lib/shutl_auth.rb', line 17 def config yield self end |