Skip to content

Commit

Permalink
Merge pull request #13 from jcmcken/master
Browse files Browse the repository at this point in the history
Fix a number of issues
  • Loading branch information
triplem authored Feb 22, 2019
2 parents 330f76f + 60cf861 commit d80ff74
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/models/oic_session.rb
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ def complete?
end

def scopes
if client_config["scopes"].nil?
if client_config["scopes"].nil?
return "openid profile email user_name"
else
client_config["scopes"].split(',').each(&:strip).join(' ')
Expand Down
3 changes: 2 additions & 1 deletion lib/redmine_openid_connect/account_controller_patch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,13 @@ def oic_local_login

firstname = user_info["given_name"]
lastname = user_info["family_name"]

if (firstname.nil? || lastname.nil?) && user_info["name"]
parts = user_info["name"].split
if parts.length >= 2
firstname = parts[0]
lastname = parts[-1]
end
end
end

attributes = {
Expand Down

0 comments on commit d80ff74

Please sign in to comment.