Module: Simple::OAuth2

Defined in:
lib/simple_oauth2.rb,
lib/simple_oauth2/scopes.rb,
lib/simple_oauth2/helpers.rb,
lib/simple_oauth2/version.rb,
lib/simple_oauth2/responses.rb,
lib/simple_oauth2/uniq_token.rb,
lib/simple_oauth2/configuration.rb,
lib/simple_oauth2/generators/base.rb,
lib/simple_oauth2/resource/bearer.rb,
lib/simple_oauth2/strategies/base.rb,
lib/simple_oauth2/strategies/code.rb,
lib/simple_oauth2/generators/token.rb,
lib/simple_oauth2/strategies/token.rb,
lib/simple_oauth2/strategies/password.rb,
lib/simple_oauth2/configuration/constants.rb,
lib/simple_oauth2/generators/authorization.rb,
lib/simple_oauth2/strategies/refresh_token.rb,
lib/simple_oauth2/configuration/class_accessors.rb,
lib/simple_oauth2/strategies/authorization_code.rb,
lib/simple_oauth2/strategies/client_credentials.rb

Overview

Semantic versioning

Defined Under Namespace

Modules: ClassAccessors, Constants, Generators, Helpers, Resource, Strategies, UniqToken, VERSION Classes: Configuration, Responses, Scopes

Class Method Summary collapse

Class Method Details

.configSimple::OAuth2::Configuration

Simple::OAuth2 configuration

Returns:



39
40
41
# File 'lib/simple_oauth2.rb', line 39

def config
  @config ||= Simple::OAuth2::Configuration.new
end

.configure {|config| ... } ⇒ Object

Configures Simple::OAuth2. Yields Simple::OAuth2::Configuration instance to the block

Yields:



45
46
47
# File 'lib/simple_oauth2.rb', line 45

def configure
  yield config if block_given?
end

.gem_versionGem::Version

Simple::OAuth2 version

Returns:

  • (Gem::Version)

    version of the gem



7
8
9
# File 'lib/simple_oauth2/version.rb', line 7

def self.gem_version
  Gem::Version.new VERSION::STRING
end

.middlewareObject

Simple::OAuth2 default middleware



50
51
52
# File 'lib/simple_oauth2.rb', line 50

def middleware
  Simple::OAuth2::Resource::Bearer
end