Created
March 23, 2017 04:08
-
-
Save nov/be7df5ec71d7eeb93063d2300f28ab90 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class OIDCRegHandler implements Auth.RegistrationHandler{ | |
public User createUser(Id portalId, Auth.UserData data){ | |
List<User> users = [SELECT Id FROM User WHERE FederationIdentifier =:data.identifier]; | |
if (users.size() == 1) { | |
return users[0]; | |
} else { | |
return null; | |
} | |
} | |
public void updateUser(Id userId, Id portalId, Auth.UserData data) { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment