Module: Shutl::Auth

Extended by:
Auth
Included in:
Auth
Defined in:
lib/shutl_auth.rb,
lib/shutl/auth/version.rb,
lib/shutl/auth/authenticator.rb,
lib/shutl/auth/access_token_request.rb,
lib/shutl/auth/authenticated_request.rb

Defined Under Namespace

Modules: AuthenticatedRequest Classes: AccessTokenRequest, Authenticator, Cache, InternalServerError, InvalidCredentials, InvalidUrl

Constant Summary collapse

VERSION =
"0.9.1"

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#client_idObject

Returns the value of attribute client_id.



23
24
25
# File 'lib/shutl_auth.rb', line 23

def client_id
  @client_id
end

#client_secretObject

Returns the value of attribute client_secret.



23
24
25
# File 'lib/shutl_auth.rb', line 23

def client_secret
  @client_secret
end

#urlObject

Returns the value of attribute url.



23
24
25
# File 'lib/shutl_auth.rb', line 23

def url
  @url
end

Class Method Details

.cacheObject



42
43
44
# File 'lib/shutl/auth/authenticated_request.rb', line 42

def self.cache
  @cache ||= build_cache
end

Instance Method Details

#config {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:

  • _self (Shutl::Auth)

    the object that the method was called on



25
26
27
# File 'lib/shutl_auth.rb', line 25

def config
  yield self
end

#loggerObject



29
30
31
32
33
# File 'lib/shutl_auth.rb', line 29

def logger
  return ::Rails.logger if Kernel.const_defined?(:Rails)
  return ::Shutl.logger if Shutl.respond_to? :logger
  Logger.new('/dev/null')
end