Documentation
¶
Index ¶
- func Builder(provider types.ProviderType, opts ...ProviderOption) providers.Builder
- type Provider
- func (p *Provider) BeginAuth(_ context.Context, input types.AuthContext) (types.AuthSession, error)
- func (p *Provider) Capabilities() types.ProviderCapabilities
- func (p *Provider) Mint(ctx context.Context, subject types.CredentialSubject) (types.CredentialPayload, error)
- func (p *Provider) Operations() []types.OperationDescriptor
- func (p *Provider) Type() types.ProviderType
- type ProviderOption
- type Session
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Builder ¶
func Builder(provider types.ProviderType, opts ...ProviderOption) providers.Builder
Builder returns a providers.Builder that constructs OAuth providers for the given provider type
Types ¶
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider implements the types.Provider interface using Zitadel's relying party helpers
func New ¶
func New(_ context.Context, spec config.ProviderSpec, options ...ProviderOption) (*Provider, error)
New constructs a Provider from the supplied spec
func (*Provider) BeginAuth ¶
func (p *Provider) BeginAuth(_ context.Context, input types.AuthContext) (types.AuthSession, error)
BeginAuth starts an OAuth authorization flow
func (*Provider) Capabilities ¶
func (p *Provider) Capabilities() types.ProviderCapabilities
Capabilities describes supported behaviours
func (*Provider) Mint ¶
func (p *Provider) Mint(ctx context.Context, subject types.CredentialSubject) (types.CredentialPayload, error)
Mint refreshes an access token using the stored credential payload
func (*Provider) Operations ¶
func (p *Provider) Operations() []types.OperationDescriptor
Operations returns the provider-published operations if configured.
func (*Provider) Type ¶
func (p *Provider) Type() types.ProviderType
Type returns the provider identifier
type ProviderOption ¶
type ProviderOption func(*Provider)
ProviderOption customizes OAuth provider construction.
func WithOperations ¶
func WithOperations(descriptors []types.OperationDescriptor) ProviderOption
WithOperations configures provider-managed operations.
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
Session implements types.AuthSession for OAuth flows
func (*Session) ProviderType ¶
func (s *Session) ProviderType() types.ProviderType
ProviderType returns the provider identifier