Class: OmniAuth::Strategies::Keystone
- Inherits:
-
Object
- Object
- OmniAuth::Strategies::Keystone
- Includes:
- OmniAuth::Strategy
- Defined in:
- lib/omniauth-keystone.rb
Instance Attribute Summary collapse
-
#auth_token ⇒ Object
Returns the value of attribute auth_token.
Instance Method Summary collapse
Instance Attribute Details
#auth_token ⇒ Object
Returns the value of attribute auth_token.
18 19 20 |
# File 'lib/omniauth-keystone.rb', line 18 def auth_token @auth_token end |
Instance Method Details
#callback_phase ⇒ Object
30 31 32 33 34 35 36 37 |
# File 'lib/omniauth-keystone.rb', line 30 def callback_phase os = OpenStack::Connection.create({:username => request['username'], :api_key=>request['password'], :auth_method=>"password", :auth_url => auth_url, :authtenant_name => request['username']}) super end |
#request_phase ⇒ Object
20 21 22 23 24 25 26 27 28 |
# File 'lib/omniauth-keystone.rb', line 20 def request_phase OmniAuth::Form.build( :title => ([:title] || "Authenticate"), :url => callback_path ) do |field| field.text_field 'Username', 'username' field.password_field 'Password', 'password' end.to_response end |