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.
-
#jsonp ⇒ Object
JSONP endpoint based on Devise session.
-
#mobile ⇒ Object
Mobile endpoint.
-
#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
25 26 27 28 29 30 31 32 |
# File 'app/controllers/sso/sessions_controller.rb', line 25 def create @session = current_client.session debug { "SessionsController#create - #{@session.inspect}"} raise "ResourceOwner from token != session.owner" if doorkeeper_token.resource_owner_id != @session.owner.id current_client.update_attributes!(client_params) render json: @session, status: :created, serializer: Sso::SessionSerializer end |
#jsonp ⇒ Object
JSONP endpoint based on Devise session
37 38 39 40 41 |
# File 'app/controllers/sso/sessions_controller.rb', line 37 def jsonp # TODO : Check inconsistent render :nothing => true # respond_with @session, :location => sso.sessions_url end |
#mobile ⇒ Object
Mobile endpoint
47 48 49 50 51 52 53 54 |
# File 'app/controllers/sso/sessions_controller.rb', line 47 def mobile # TODO : Check inconsistent # passport.load_user! # passport.create_chip! render :nothing => true # respond_with @session, :location => sso.sessions_url end |
#show ⇒ Object
Passport verification Session exists (browser/insider) - return passport state Sessionless (iphone/outsider) Returns passport
17 18 19 20 |
# File 'app/controllers/sso/sessions_controller.rb', line 17 def show @session = current_client.session render json: @session, serializer: Sso::SessionSerializer end |