feat(op): ID token for device authorization grant

closes #426
This commit is contained in:
Tim Möhlmann 2023-12-13 18:05:37 +02:00
parent 9d12d1d900
commit 3a16504990
4 changed files with 116 additions and 5 deletions

View file

@ -39,7 +39,7 @@ type AuthRequest struct {
CodeChallenge *OIDCCodeChallenge
done bool
authTime time.Time
AuthTime time.Time
}
// LogValue allows you to define which fields will be logged.
@ -76,7 +76,7 @@ func (a *AuthRequest) GetAudience() []string {
}
func (a *AuthRequest) GetAuthTime() time.Time {
return a.authTime
return a.AuthTime
}
func (a *AuthRequest) GetClientID() string {

View file

@ -771,7 +771,7 @@ func (s *Storage) getTokenExchangeClaims(ctx context.Context, request op.TokenEx
func getInfoFromRequest(req op.TokenRequest) (clientID string, authTime time.Time, amr []string) {
authReq, ok := req.(*AuthRequest) // Code Flow (with scope offline_access)
if ok {
return authReq.ApplicationID, authReq.authTime, authReq.GetAMR()
return authReq.ApplicationID, authReq.AuthTime, authReq.GetAMR()
}
refreshReq, ok := req.(*RefreshTokenRequest) // Refresh Token Request
if ok {