File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 11package jwt
22
3+ import "strings"
4+
35type rawClaims struct {
46 RawAudiences interface {} `json:"aud"` // RawAudiences could be a []string or string depending on the serialization in IdP site
57 RawEmail string `json:"email,omitempty"`
@@ -15,23 +17,23 @@ type rawWebToken struct {
1517}
1618
1719func (r rawWebToken ) getMail () (mail string ) {
18- mail = r .RawMail
20+ mail = strings . TrimSpace ( r .RawMail )
1921 if mail == "" {
2022 mail = r .RawEmail
2123 }
2224 return
2325}
2426
2527func (r rawWebToken ) getLastName () (lastName string ) {
26- lastName = r .LastName
28+ lastName = strings . TrimSpace ( r .LastName )
2729 if lastName == "" {
2830 lastName = r .RawFamilyName
2931 }
3032 return
3133}
3234
3335func (r rawWebToken ) getFirstName () (firstName string ) {
34- firstName = r .FirstName
36+ firstName = strings . TrimSpace ( r .FirstName )
3537 if firstName == "" {
3638 firstName = r .RawGivenName
3739 }
You can’t perform that action at this time.
0 commit comments