mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Email: trigger email verification flow (#85587)
* Add email and email_verified to id token if identity is a user * Add endpoint to trigger email verification for user * Add function to clear stored id tokens and use it when email verification is completed
This commit is contained in:
@@ -11,6 +11,9 @@ import (
|
||||
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)
|
||||
|
||||
// RemoveIDToken removes any locally stored id tokens for key
|
||||
RemoveIDToken(ctx context.Context, identity identity.Requester) error
|
||||
}
|
||||
|
||||
type IDSigner interface {
|
||||
@@ -19,5 +22,7 @@ type IDSigner interface {
|
||||
|
||||
type IDClaims struct {
|
||||
jwt.Claims
|
||||
Email string `json:"email"`
|
||||
EmailVerified bool `json:"email_verified"`
|
||||
AuthenticatedBy string `json:"authenticatedBy,omitempty"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user