IDForwarding: add "authenticatedBy" to id token (#80622)
* IDForwading: Set authenticated by for users
This commit is contained in:
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user