Documentation
¶
Index ¶
- type InMemoryRegistrar
- func (r *InMemoryRegistrar) DeleteClient(ctx context.Context, clientID string) error
- func (r *InMemoryRegistrar) GetClient(ctx context.Context, clientID string) (*types.DynamicClientRegistrationResponse, error)
- func (r *InMemoryRegistrar) RegisterClient(ctx context.Context, req *types.DynamicClientRegistrationRequest) (*types.DynamicClientRegistrationResponse, error)
- func (r *InMemoryRegistrar) ServeRegistration(w http.ResponseWriter, req *http.Request)
- func (r *InMemoryRegistrar) UpdateClient(ctx context.Context, clientID string, ...) (*types.DynamicClientRegistrationResponse, error)
- type RegistrarConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InMemoryRegistrar ¶
type InMemoryRegistrar struct {
// contains filtered or unexported fields
}
InMemoryRegistrar implements dynamic client registration using in-memory storage
func NewInMemoryRegistrar ¶
func NewInMemoryRegistrar(logger *logrus.Logger) *InMemoryRegistrar
NewInMemoryRegistrar creates a new in-memory client registrar
func (*InMemoryRegistrar) DeleteClient ¶
func (r *InMemoryRegistrar) DeleteClient(ctx context.Context, clientID string) error
DeleteClient deletes a registered client
func (*InMemoryRegistrar) GetClient ¶
func (r *InMemoryRegistrar) GetClient(ctx context.Context, clientID string) (*types.DynamicClientRegistrationResponse, error)
GetClient retrieves a registered client by ID
func (*InMemoryRegistrar) RegisterClient ¶
func (r *InMemoryRegistrar) RegisterClient(ctx context.Context, req *types.DynamicClientRegistrationRequest) (*types.DynamicClientRegistrationResponse, error)
RegisterClient registers a new OAuth client (RFC7591)
func (*InMemoryRegistrar) ServeRegistration ¶
func (r *InMemoryRegistrar) ServeRegistration(w http.ResponseWriter, req *http.Request)
ServeRegistration handles HTTP requests for client registration
func (*InMemoryRegistrar) UpdateClient ¶
func (r *InMemoryRegistrar) UpdateClient(ctx context.Context, clientID string, req *types.DynamicClientRegistrationRequest) (*types.DynamicClientRegistrationResponse, error)
UpdateClient updates an existing client registration
type RegistrarConfig ¶
type RegistrarConfig struct {
AllowedRedirectSchemes []string `json:"allowed_redirect_schemes"`
RequireRedirectURIs bool `json:"require_redirect_uris"`
DefaultGrantTypes []string `json:"default_grant_types"`
DefaultResponseTypes []string `json:"default_response_types"`
DefaultScope string `json:"default_scope"`
ClientSecretTTL time.Duration `json:"client_secret_ttl"`
MaxRedirectURIs int `json:"max_redirect_uris"`
}
RegistrarConfig contains configuration for the client registrar
Click to show internal directories.
Click to hide internal directories.