Documentation ¶
Index ¶
Constants ¶
View Source
const (
ZitadelKeyPath = "ZITADEL_KEY_PATH"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AuthInterceptor ¶
type AuthInterceptor struct {
oauth2.TokenSource
}
func NewAuthenticator ¶
func NewAuthenticator(issuer string, jwtProfileTokenSource JWTProfileTokenSource, scopes ...string) (*AuthInterceptor, error)
NewAuthenticator creates an interceptor which authenticates a service account with a provided JWT Profile (using a key.json either as file or data). There returned token will be used for authorization in all calls if expired, the token will be automatically refreshed
func (*AuthInterceptor) Stream ¶
func (interceptor *AuthInterceptor) Stream() grpc.StreamClientInterceptor
func (*AuthInterceptor) Unary ¶
func (interceptor *AuthInterceptor) Unary() grpc.UnaryClientInterceptor
type JWTProfileTokenSource ¶
type JWTProfileTokenSource func(issuer string, scopes []string) (oauth2.TokenSource, error)
func JWTProfileFromFileData ¶
func JWTProfileFromFileData(ctx context.Context, fileData []byte) JWTProfileTokenSource
func JWTProfileFromKeyAndUserID ¶
func JWTProfileFromKeyAndUserID(ctx context.Context, key []byte, keyID, userID string) JWTProfileTokenSource
func JWTProfileFromPath ¶
func JWTProfileFromPath(ctx context.Context, keyPath string) JWTProfileTokenSource
type OrgInterceptor ¶
type OrgInterceptor struct {
// contains filtered or unexported fields
}
func NewOrgInterceptor ¶
func NewOrgInterceptor(orgID string) *OrgInterceptor
NewOrgInterceptor statically set the organisation context for every call
If you need to switch between multiple organisations for different requests, use the SetOrgID function directly on your calls (see example/mgmt/mgmt.go)
func (*OrgInterceptor) Stream ¶
func (interceptor *OrgInterceptor) Stream() grpc.StreamClientInterceptor
func (*OrgInterceptor) Unary ¶
func (interceptor *OrgInterceptor) Unary() grpc.UnaryClientInterceptor
Click to show internal directories.
Click to hide internal directories.