Module: Toot::Auth
- Defined in:
- lib/toot/auth.rb,
lib/toot/auth/rails.rb,
lib/toot/auth/version.rb,
lib/toot/auth/credentials.rb,
lib/toot/auth/adds_credentials.rb,
lib/toot/auth/lists_credentials.rb,
lib/toot/auth/checks_credentials.rb,
lib/toot/auth/removes_credentials.rb,
lib/toot/auth/generates_credentials.rb
Defined Under Namespace
Classes: AddsCredentials, ChecksCredentials, Credentials, GeneratesCredentials, ListsCredentials, Rails, RemovesCredentials
Constant Summary
collapse
- VERSION =
"0.2.0"
Class Method Summary
collapse
Class Method Details
.install_client_auth ⇒ Object
31
32
33
34
35
36
|
# File 'lib/toot/auth.rb', line 31
def self.install_client_auth
Toot.config.http_connection.basic_auth(
Toot.config.auth_username,
Toot.config.auth_password
)
end
|
.service_wrapper(app, store_key: Toot.config.auth_credentials_store_key) ⇒ Object
25
26
27
28
29
|
# File 'lib/toot/auth.rb', line 25
def self.service_wrapper(app, store_key: Toot.config.auth_credentials_store_key)
Rack::Auth::Basic.new(app, "Toot Auth") do |username, password|
ChecksCredentials.(username: username, password: password, store_key: store_key)
end
end
|