Module: FlexmlsApi::Authentication::OAuth2Impl

Defined in:
lib/flexmls_api/authentication/oauth2_impl/grant_type_refresh.rb,
lib/flexmls_api/authentication/oauth2.rb,
lib/flexmls_api/authentication/oauth2_impl/middleware.rb,
lib/flexmls_api/authentication/oauth2_impl/grant_type_base.rb,
lib/flexmls_api/authentication/oauth2_impl/grant_type_code.rb,
lib/flexmls_api/authentication/oauth2_impl/password_provider.rb,
lib/flexmls_api/authentication/oauth2_impl/grant_type_password.rb

Overview

OAuth2 authentication flow to refresh an access token

Defined Under Namespace

Classes: GrantTypeBase, GrantTypeCode, GrantTypePassword, GrantTypeRefresh, Middleware, PasswordProvider

Class Method Summary collapse

Class Method Details

.load_provider(string, args = {}) ⇒ Object

Loads a provider class from a string



188
189
190
191
192
193
194
# File 'lib/flexmls_api/authentication/oauth2.rb', line 188

def self.load_provider(string, args={})
  constant = Object
  string.split("::").compact.each { |name| constant = constant.const_get(name) unless name == ""}
  constant.new(args)
rescue => e
  raise ArgumentError, "The value '#{string}' is an invalid class name for an oauth2 provider:  #{e.message}"
end