Skip to content

Commit

Permalink
Update Omniauth strategies
Browse files Browse the repository at this point in the history
  • Loading branch information
moustachu authored Jan 16, 2025
1 parent b9354c0 commit 729d6ba
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/omniauth/strategies/ubx.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,17 @@ class UBX < OmniAuth::Strategies::CAS
option :origin_param, "redirect_url"
option :service_validate_url, "/p3/serviceValidate"

option :name_key, "givenName"
option :first_name_key, "sn"
option :last_name_key, "givenName"
option :email_key, "mail"
option :status_key, "eduPersonEntitlement"

# Auth hash schema keys for consistency with OmniAuth schema
AUTH_HASH_SCHEMA_KEYS = %w(name email nickname first_name last_name location image phone status).freeze

info do
prune!(
name: raw_info[options[:name_key].to_s],
name: "#{raw_info[options[:first_name_key].to_s]} #{raw_info[options[:last_name_key].to_s]}",
email: raw_info[options[:email_key].to_s],
nickname: raw_info[options[:nickname_key].to_s],
first_name: raw_info[options[:first_name_key].to_s],
Expand Down

0 comments on commit 729d6ba

Please sign in to comment.