I am using CAS to authenticate users for a service, which contains user profiles. I need to map this user profiles to the users, i.e. I need a unique user identifier, which I get from the authentication. This is more or less provided by the CAS, however I also need to store the information where the user comes from (or which authentication provider did he use - internal one, external SAML, oAUTH, LDAP, etc...). Is there any configurable way how to do this? I think I could override the AbstractPreAndPostProcessingAuthenticationHandler.postAuthenticate() method and try to retrieve some information from the credentials.
Another problem which I face in this context is, that prior to the authentication I need a mapping of the user profiles to the users. This needs to be imported by the system administrator, however he needs to know the unique IDs which CAS will be returning for the users. From the documentation for the delegated authentication:
- An identifier which is the profile type +
# + the identifier of the user for this provider (i.e FacebookProfile#0000000001)
Is there any ENUM or anything which identifies the providers inside the CAS? I need to have a list of profiles with at least these attributes:
- ID of the user (must be unique throughout the CAS)
- origin - unique identifier of the system or authentication handler, i.e. LDAP, SAML 2.0 for Google, SAML 2.0 for Facebook, etc....