app/controllers/api/user_controller.rb in gds-sso-1.0.0 vs app/controllers/api/user_controller.rb in gds-sso-1.1.0
- old
+ new
@@ -7,9 +7,18 @@
oauth_hash = build_gds_oauth_hash(user_json)
GDS::SSO::Config.user_klass.find_for_gds_oauth(oauth_hash)
head :ok
end
+ 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
+
private
# This should mirror the object created by the omniauth-gds strategy/gem
# By doing this, we can reuse the code for creating/updating the user
def build_gds_oauth_hash(user_json)
OmniAuth::AuthHash.new(