Documentation ¶
Index ¶
- Constants
- func AuthorizeAdminOnly(c context.Context) bool
- func AuthorizeSelfOrAdmin(c context.Context, namespaceID uuid.UUID) bool
- func GetDelegateClient[C, CK any](c context.Context, contextKey CK) *C
- func HasRole(c context.Context, roleValue string) bool
- func PreconfiguredKeysJWTAuthorization(keys []cloudkey.JsonWebKey, aud string) echo.MiddlewareFunc
- func ProxiedAADAuth(next echo.HandlerFunc) echo.HandlerFunc
- func ResolveSelfNamespace(c context.Context, nsID string) uuid.UUID
- func UnverifiedAADJwtAuth(next echo.HandlerFunc) echo.HandlerFunc
- func WithDelegatedClient[C, CK any](c ctx.RequestContext, contextKey CK, ...) (ctx.RequestContext, *C, error)
- type AuthIdentity
- type AzureAppConfidentialIdentity
- type AzureIdentity
Constants ¶
View Source
const ( RoleValueAgentActiveHost = "Agent.ActiveHost" RoleValueCertificateEnroll = "Certificate.Enroll" )
View Source
const (
AppConfidentialIdentityContextKey contextKey
)
Variables ¶
This section is empty.
Functions ¶
func AuthorizeAdminOnly ¶
Deprecated use authz.AuthorizeAdminOnly instead.
func AuthorizeSelfOrAdmin ¶
func GetDelegateClient ¶
func PreconfiguredKeysJWTAuthorization ¶
func PreconfiguredKeysJWTAuthorization(keys []cloudkey.JsonWebKey, aud string) echo.MiddlewareFunc
func ProxiedAADAuth ¶
func ProxiedAADAuth(next echo.HandlerFunc) echo.HandlerFunc
func UnverifiedAADJwtAuth ¶
func UnverifiedAADJwtAuth(next echo.HandlerFunc) echo.HandlerFunc
func WithDelegatedClient ¶
func WithDelegatedClient[C, CK any](c ctx.RequestContext, contextKey CK, getClient func(azcore.TokenCredential) (*C, error)) (ctx.RequestContext, *C, error)
Types ¶
type AuthIdentity ¶
type AuthIdentity interface { ClientPrincipalID() uuid.UUID ClientPrincipalDisplayName() string AppID() string HasAdminRole() bool HasRole(roleValue string) bool GetOnBehalfOfTokenCredential(c context.Context, opts *azidentity.OnBehalfOfCredentialOptions) (azcore.TokenCredential, error) }
func GetAuthIdentity ¶
func GetAuthIdentity(c context.Context) AuthIdentity
type AzureAppConfidentialIdentity ¶
type AzureAppConfidentialIdentity interface { AzureIdentity NewOnBehalfOfTokenCredential(userAssertion string, opts *azidentity.OnBehalfOfCredentialOptions) (azcore.TokenCredential, error) }
type AzureIdentity ¶
type AzureIdentity interface { TokenCredential() azcore.TokenCredential TenantID() string ClientID() string }
Click to show internal directories.
Click to hide internal directories.