Class: Api::UserController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- Api::UserController
show all
- Includes:
- GDS::SSO::ControllerMethods
- Defined in:
- app/controllers/api/user_controller.rb
Instance Method Summary
collapse
#authenticate_user!, #authorise_user!, #current_user, included, #logout, #require_signin_permission!, #user_remotely_signed_out?, #user_signed_in?, #warden
Instance Method Details
#reauth ⇒ Object
15
16
17
18
19
20
21
22
|
# File 'app/controllers/api/user_controller.rb', line 15
def reauth
user = GDS::SSO::Config.user_klass.where(:uid => params[:uid]).first
if user.nil? || user.set_remotely_signed_out!
head :ok, content_type: 'text/plain'
else
head 500, content_type: 'text/plain'
end
end
|
#update ⇒ Object
8
9
10
11
12
13
|
# File 'app/controllers/api/user_controller.rb', line 8
def update
user_json = JSON.parse(request.body.read)['user']
oauth_hash = build_gds_oauth_hash(user_json)
GDS::SSO::Config.user_klass.find_for_gds_oauth(oauth_hash)
head :ok, content_type: 'text/plain'
end
|