Documentation ¶
Index ¶
- func ScopeProjectID(projectID string) string
- func ScopeZitadelAPI() string
- func WithCustomURL(issuer, api string) func(*Connection) error
- func WithInsecure() func(*Connection) error
- func WithJWTProfileTokenSource(provider middleware.JWTProfileTokenSource) func(*Connection) error
- func WithKeyPath(keyPath string) func(*Connection) errordeprecated
- func WithOrgID(orgID string) func(*Connection) error
- func WithStreamInterceptors(interceptors ...grpc.StreamClientInterceptor) func(*Connection) error
- func WithUnaryInterceptors(interceptors ...grpc.UnaryClientInterceptor) func(*Connection) error
- type Connection
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ScopeProjectID ¶
ScopeProjectID will add the requested projectID to the audience of the access and id token
func ScopeZitadelAPI ¶
func ScopeZitadelAPI() string
ScopeZitadelAPI adds the ProjectID of the ZITADEL Project
func WithCustomURL ¶
func WithCustomURL(issuer, api string) func(*Connection) error
WithCustomURL replaces the standard issuer (https://issuer.zitadel.ch) and api endpoint (api.zitadel.ch:443)
func WithInsecure ¶
func WithInsecure() func(*Connection) error
WithInsecure disables transport security for the client connection use only when absolutely necessary (local development)
func WithJWTProfileTokenSource ¶
func WithJWTProfileTokenSource(provider middleware.JWTProfileTokenSource) func(*Connection) error
WithJWTProfileTokenSource sets the provider used for the authentication if not set, the key file will be read from the path set in env var ZITADEL_KEY_PATH
func WithKeyPath
deprecated
func WithKeyPath(keyPath string) func(*Connection) error
WithKeyPath sets the path to the key.json used for the authentication if not set env var ZITADEL_KEY_PATH will be used
Deprecated: use WithJWTProfileTokenSource(middleware.JWTProfileFromPath(keyPath)) instead
func WithOrgID ¶
func WithOrgID(orgID string) func(*Connection) error
WithOrgID sets the organization context (where the api calls are executed) if not set the resource owner (organisation) of the calling user will be used
func WithStreamInterceptors ¶
func WithStreamInterceptors(interceptors ...grpc.StreamClientInterceptor) func(*Connection) error
WithStreamInterceptors adds non ZITADEL specific interceptors to the connection
func WithUnaryInterceptors ¶
func WithUnaryInterceptors(interceptors ...grpc.UnaryClientInterceptor) func(*Connection) error
WithUnaryInterceptors adds non ZITADEL specific interceptors to the connection
Types ¶
type Connection ¶
type Connection struct { *grpc.ClientConn // contains filtered or unexported fields }
func NewConnection ¶
func NewConnection(issuer, api string, scopes []string, options ...Option) (*Connection, error)
type Option ¶
type Option func(*Connection) error