Sha256: bed9f7fd220d5e9ea562e1cae8cf01769b7e74a13c0a24b37e6e493cf8318bca
Contents?: true
Size: 1.45 KB
Versions: 4
Compression:
Stored size: 1.45 KB
Contents
include ActionView::Helpers::TextHelper class Users::OmniauthCallbacksController < ApplicationController def GadzOrg @data=request.env['omniauth.auth'] # @data={"provider"=>"GadzOrg", # "uid"=>"thomas.fuzeau.2008", # "info"=>{"email"=>"thomas.fuzeau@gadz.org"}, # "credentials"=>{"ticket"=>"ST-364828-uc7TFKGJDcIOY0upGxE0-cas"}, # "extra"=> # {"user"=>"thomas.fuzeau.2008", # "last_change"=>"2012-08-29", # "sex"=>"male", # "centre"=>"CER de Metz", # "promo"=>"X2008", # "lastname"=>"Fuzeau", # "firstname"=>"Thomas", # "directory_name"=>"Fuzeau Thomas", # "type"=>"gadz", # "ddp"=>"zgo,www", # "display_name"=>"Thomas", # "ensamid"=>"20081398", # "username"=>"thomas.fuzeau.2008", # "is_admin"=>"false", # "allproms"=>"81-21.me208", # "registration_date"=>"2012-08-06 22:15:16.0", # "pgtype"=>"pg", # "soce_id"=>"66273", # "full_name"=>"Thomas Fuzeau"}} data = request.env['omniauth.auth'] @user = User.omniauth(data) return redirect_to root_path, flash:{error: "Impossible d'identifier cet utilisateur"} unless @user if @user.persisted? sign_in_and_redirect @user, :event => :authentication else flash[:alert] = I18n.t 'omniauth.error' redirect_to new_user_registration_url end end end
Version data entries
4 entries across 4 versions & 1 rubygems