Class: Api::UserController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/api/user_controller.rb

Instance Method Summary collapse

Instance Method Details

#reauthObject



12
13
14
15
16
17
18
19
# File 'app/controllers/api/user_controller.rb', line 12

def reauth
  user = GDS::SSO::Config.user_klass.find_by_uid(params[:uid])
  if user.set_remotely_signed_out!
    head :ok
  else
    head 500
  end
end

#updateObject



5
6
7
8
9
10
# File 'app/controllers/api/user_controller.rb', line 5

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
end