Class: Sso::SessionsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- ApplicationController
- Sso::SessionsController
- Includes:
- Logging
- Defined in:
- app/controllers/sso/sessions_controller.rb
Instance Method Summary collapse
-
#create ⇒ Object
Passport exchange Passport Strategy first exchange Insider : Client information from Apps should always be trusted.
-
#id ⇒ Object
JSONP endpoint based on Devise session.
-
#show ⇒ Object
Passport verification Session exists (browser/insider) - return passport state Sessionless (iphone/outsider) Returns passport.
Methods included from Logging
#debug, #error, #fatal, #info, #warn
Instance Method Details
#create ⇒ Object
Passport exchange Passport Strategy first exchange Insider : Client information from Apps should always be trusted
16 17 18 19 20 21 22 23 24 |
# File 'app/controllers/sso/sessions_controller.rb', line 16 def create @client = current_client @session = @client.session debug { "SessionsController#create - #{@session.inspect}"} raise "ResourceOwner from token != session.owner" if doorkeeper_token.resource_owner_id != @session.owner.id @client.update_attributes!(client_params) render json: @client, status: :created, serializer: Sso::ClientSerializer end |
#id ⇒ Object
JSONP endpoint based on Devise session
29 30 31 |
# File 'app/controllers/sso/sessions_controller.rb', line 29 def id render json: { passport_id: sso_session_id } end |
#show ⇒ Object
Passport verification Session exists (browser/insider) - return passport state Sessionless (iphone/outsider) Returns passport
37 38 39 40 |
# File 'app/controllers/sso/sessions_controller.rb', line 37 def show @session = Sso::Session.find(sso_session_id) render json: @session, serializer: Sso::SessionSerializer end |