IDForwarding: add "authenticatedBy" to id token (#80622)

* IDForwading: Set authenticated by for users
This commit is contained in:
Karl Persson
2024-01-17 09:52:05 +01:00
committed by GitHub
parent 0d1462cbbb
commit 43b6b6b2a4
5 changed files with 124 additions and 17 deletions
+18
View File
@@ -0,0 +1,18 @@
package idtest
import (
"context"
"github.com/grafana/grafana/pkg/services/auth"
)
type MockSigner struct {
SignIDTokenFn func(ctx context.Context, claims *auth.IDClaims) (string, error)
}
func (s *MockSigner) SignIDToken(ctx context.Context, claims *auth.IDClaims) (string, error) {
if s.SignIDTokenFn != nil {
return s.SignIDTokenFn(ctx, claims)
}
return "", nil
}