IDForwarding: Add auth hook to generate id token (#75555)

* AuthN: Move identity struct to its own file

* IDForwarding: Add IDToken property to usr and identity structs and add GetIDToken to requester interface

* Inject IDService into background services

* IDForwarding: Register post auth hook when feature toggle is enabled
This commit is contained in:
Karl Persson
2023-09-28 09:22:05 +02:00
committed by GitHub
parent 3a1c3be057
commit b9b4246432
8 changed files with 264 additions and 170 deletions
+3
View File
@@ -62,6 +62,9 @@ type Requester interface {
HasUniqueId() bool
// AuthenticatedBy returns the authentication method used to authenticate the entity.
GetAuthenticatedBy() string
// GetIDToken returns a signed token representing the identity that can be forwarded to plugins and external services.
// Will only be set when featuremgmt.FlagIdForwarding is enabled.
GetIDToken() string
}
// IntIdentifier converts a string identifier to an int64.