Documentation
¶
Overview ¶
Package oauth implements the oauth integration provider.
Index ¶
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 {
// BaseProvider holds shared provider metadata
providers.BaseProvider
// contains filtered or unexported fields
}
Provider implements the types.Provider interface using Zitadel's relying party helpers
func New ¶
func New(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) Mint ¶
func (p *Provider) Mint(ctx context.Context, subject types.CredentialSubject) (types.CredentialPayload, error)
Mint refreshes an access token using the stored credential payload
type ProviderOption ¶
type ProviderOption func(*Provider)
ProviderOption customizes OAuth provider construction.
func WithClientDescriptors ¶ added in v1.9.3
func WithClientDescriptors(descriptors []types.ClientDescriptor) ProviderOption
WithClientDescriptors registers client descriptors for pooling.
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