Class: Doorkeeper::Config::Builder
- Inherits:
-
Object
- Object
- Doorkeeper::Config::Builder
- Defined in:
- lib/doorkeeper/config.rb
Instance Method Summary collapse
- #access_token_methods(*methods) ⇒ Object
- #build ⇒ Object
- #client_credentials(*methods) ⇒ Object
- #confirm_application_owner ⇒ Object
- #default_scopes(*scopes) ⇒ Object
- #enable_application_owner(opts = {}) ⇒ Object
-
#initialize(&block) ⇒ Builder
constructor
A new instance of Builder.
- #optional_scopes(*scopes) ⇒ Object
- #use_refresh_token ⇒ Object
Constructor Details
Instance Method Details
#access_token_methods(*methods) ⇒ Object
64 65 66 |
# File 'lib/doorkeeper/config.rb', line 64 def access_token_methods(*methods) @config.instance_variable_set("@access_token_methods", methods) end |
#build ⇒ Object
39 40 41 |
# File 'lib/doorkeeper/config.rb', line 39 def build @config end |
#client_credentials(*methods) ⇒ Object
60 61 62 |
# File 'lib/doorkeeper/config.rb', line 60 def client_credentials(*methods) @config.instance_variable_set("@client_credentials", methods) end |
#confirm_application_owner ⇒ Object
48 49 50 |
# File 'lib/doorkeeper/config.rb', line 48 def confirm_application_owner @config.instance_variable_set("@confirm_application_owner", true) end |
#default_scopes(*scopes) ⇒ Object
52 53 54 |
# File 'lib/doorkeeper/config.rb', line 52 def default_scopes(*scopes) @config.instance_variable_set("@default_scopes", Doorkeeper::OAuth::Scopes.from_array(scopes)) end |
#enable_application_owner(opts = {}) ⇒ Object
43 44 45 46 |
# File 'lib/doorkeeper/config.rb', line 43 def enable_application_owner(opts={}) @config.instance_variable_set("@enable_application_owner", true) confirm_application_owner if opts[:confirmation].present? && opts[:confirmation] end |
#optional_scopes(*scopes) ⇒ Object
56 57 58 |
# File 'lib/doorkeeper/config.rb', line 56 def optional_scopes(*scopes) @config.instance_variable_set("@optional_scopes", Doorkeeper::OAuth::Scopes.from_array(scopes)) end |
#use_refresh_token ⇒ Object
68 69 70 |
# File 'lib/doorkeeper/config.rb', line 68 def use_refresh_token @config.instance_variable_set("@refresh_token_enabled", true) end |