Hi Chris,

I'm trying to configure the Forgot username feature in CAS 6.4.3 and I have 
the same behaviour, the email contains the email address instead of the 
username... Did you find a solution for this problem?

Thank you!

Joseph

Le mercredi 30 juin 2021 à 16 h 47 min 23 s UTC-4, Chris Durham a écrit :

> Just wondering if anyone else has any issues in getting the username to 
> appear in the email template for Forgot Username in CAS 6.4.0 RC5
>
> On Saturday, 19 June 2021 at 23:49:02 UTC-5 Chris Durham wrote:
>
>> We are trying to use the new Password Management functionality in 6.4.0 
>> (with JDBC) and facing a few issues.
>>
>> When we submit the email for the user we get the following lines in the 
>> logs
>>
>> WARN 
>> [org.apereo.cas.authentication.principal.resolvers.ChainingPrincipalResolver]
>>  
>> - <None of the principal resolvers in the chain were able to produce a 
>> principal>
>>
>> We have the following settings in our properties files
>>
>> cas.authn.pm.jdbc.sql-find-email=SELECT email FROM user WHERE username = ?
>>
>> cas.authn.pm.jdbc.sql-find-phone=SELECT phone FROM user WHERE username = 
>> ?
>>
>> cas.authn.pm.jdbc.sql-find-user=SELECT username FROM user WHERE email = ? 
>> limit 1
>>
>> In our resultant email the only attribute that is added is "email" which 
>> is the one thing that the user already knows :). We don't get a principal 
>> or a username.
>>
>> Trying to read my way through the code 
>> in SendForgotUsernameInstructionsAction
>>
>> locateUserAndProcess gets the username from 
>> PasswordManagementService.findUsername(query)
>>
>> but sendForgotUsernameEmailToAccount builds the credentials with 
>> query.getUsername() - but surely username isn't in Query - otherwise 
>> locateUserAndProcess could have done the same thing?
>>
>> I can see this changed in the 'refactor apis for pswd mgmt' in Feb 2021 - 
>> but can't see how username is supposed to get into query...
>>
>> One thing that is additionally slightly annoying here is that in our case 
>> multiple usernames could be associated with a single email address and it 
>> would be nice to tell the user all of them.
>>
>> Also for us it would be great if we could get information about the 
>> requesting service in the email to tailor the email even further.
>>
>

-- 
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
--- 
You received this message because you are subscribed to the Google Groups "CAS 
Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/a05e4462-ce21-4539-96d5-9ddfd2188578n%40apereo.org.

Reply via email to