feat: Enable parsing email_verified from string. (#139)
* Enable parsing email_verified from string. AWS Cognito will return email_verified from /userinfo endpoint as string. This fix will accept proper boolean values as well as string values. Links for reference: https://forums.aws.amazon.com/thread.jspa?messageID=949441󧳁 https://discuss.elastic.co/t/openid-error-after-authenticating-against-aws-cognito/206018/11 * feat: Enable parsing email_verified from string.
This commit is contained in:
parent
c45f03e144
commit
763d3334e7
3 changed files with 79 additions and 7 deletions
|
@ -115,7 +115,7 @@ func (u *introspectionResponse) GetEmail() string {
|
|||
}
|
||||
|
||||
func (u *introspectionResponse) IsEmailVerified() bool {
|
||||
return u.EmailVerified
|
||||
return bool(u.EmailVerified)
|
||||
}
|
||||
|
||||
func (u *introspectionResponse) GetPhoneNumber() string {
|
||||
|
@ -200,7 +200,7 @@ func (u *introspectionResponse) SetPreferredUsername(name string) {
|
|||
|
||||
func (u *introspectionResponse) SetEmail(email string, verified bool) {
|
||||
u.Email = email
|
||||
u.EmailVerified = verified
|
||||
u.EmailVerified = boolString(verified)
|
||||
}
|
||||
|
||||
func (u *introspectionResponse) SetPhone(phone string, verified bool) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue