forked from External/greenlight
Added SAML2 support (#185)
* ~ in gitignore * add config options for SAML authentication * add information about SP metadata * add gem for omniauth-saml * Add the SAML strategy as a middleware * add gem for omniauth-saml * Send SAML request to saml module * Pass env parameters to saml provider * Add options for specifying saml signing certificate * Almost there * Re-enable SAML redirection * Correctly map saml attributes * change full certificate to only the fingerprint * change full certificate to only the fingerprint * revert changes to gitgnore * cleanup
This commit is contained in:
committed by
Jesus Federico
parent
8c64087395
commit
ab62fc3e13
@ -55,6 +55,14 @@ class User < ApplicationRecord
|
||||
auth_hash['info']['email']
|
||||
end
|
||||
|
||||
def self.saml_username(auth_hash)
|
||||
auth_hash['info']['nickname']
|
||||
end
|
||||
|
||||
def self.saml_email(auth_hash)
|
||||
auth_hash['info']['email']
|
||||
end
|
||||
|
||||
def set_encrypted_id
|
||||
self.encrypted_id = "#{username[0..1]}-#{Digest::SHA1.hexdigest(uid+provider)[0..7]}"
|
||||
end
|
||||
|
Reference in New Issue
Block a user