mirror of
https://github.com/grafana/grafana.git
synced 2024-11-29 12:14:08 -06:00
147bf01745
* Always forward id tokens to plugins
24 lines
547 B
Go
24 lines
547 B
Go
package auth
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/go-jose/go-jose/v3/jwt"
|
|
|
|
"github.com/grafana/grafana/pkg/services/auth/identity"
|
|
)
|
|
|
|
type IDService interface {
|
|
// SignIdentity signs a id token for provided identity that can be forwarded to plugins and external services
|
|
SignIdentity(ctx context.Context, identity identity.Requester) (string, error)
|
|
}
|
|
|
|
type IDSigner interface {
|
|
SignIDToken(ctx context.Context, claims *IDClaims) (string, error)
|
|
}
|
|
|
|
type IDClaims struct {
|
|
jwt.Claims
|
|
AuthenticatedBy string `json:"authenticatedBy,omitempty"`
|
|
}
|