check access token expiration
This commit is contained in:
parent
de2fd41f40
commit
80572ded78
1 changed files with 3 additions and 0 deletions
|
@ -488,6 +488,9 @@ func (s *Storage) SetUserinfoFromToken(ctx context.Context, userinfo *oidc.UserI
|
||||||
// return err
|
// return err
|
||||||
// }
|
// }
|
||||||
//}
|
//}
|
||||||
|
if token.Expiration.Before(time.Now()) {
|
||||||
|
return fmt.Errorf("token is expired")
|
||||||
|
}
|
||||||
return s.setUserinfo(ctx, userinfo, token.Subject, token.ApplicationID, token.Scopes)
|
return s.setUserinfo(ctx, userinfo, token.Subject, token.ApplicationID, token.Scopes)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue