Class: Sso::SessionsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- ApplicationController
- Sso::SessionsController
- 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.
Instance Method Details
#create ⇒ Object
Passport exchange Passport Strategy first exchange Insider : Client information from Apps should always be trusted
28 29 30 31 32 33 34 35 36 |
# File 'app/controllers/sso/sessions_controller.rb', line 28 def create # passport.load_user! # passport.create_chip! current_client = ::Sso::Client.find_by_access_token(doorkeeper_token.token) current_client.update!(client_params) @session = current_client.session render json: @session, status: :created, serializer: Sso::SessionSerializer end |
#jsonp ⇒ Object
JSONP endpoint based on Devise session
41 42 43 44 45 |
# File 'app/controllers/sso/sessions_controller.rb', line 41 def jsonp # TODO : Check inconsistent render :nothing => true # respond_with @session, :location => sso.sessions_url end |
#mobile ⇒ Object
Mobile endpoint
51 52 53 54 55 |
# File 'app/controllers/sso/sessions_controller.rb', line 51 def mobile # TODO : Check inconsistent 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
20 21 22 23 |
# File 'app/controllers/sso/sessions_controller.rb', line 20 def show @session = current_client.session render json: @session, serializer: Sso::SessionSerializer end |