Documentation
¶
Index ¶
- Variables
- type RateLimitedError
- type Service
- func (s *Service) CheckDeviceCodeCreate(ctx context.Context, clientInfo requestmeta.ClientInfo) error
- func (s *Service) CheckDeviceDecision(ctx context.Context, username string, clientInfo requestmeta.ClientInfo) error
- func (s *Service) CheckDeviceTokenExchange(ctx context.Context, clientInfo requestmeta.ClientInfo) error
- func (s *Service) CheckLogout(ctx context.Context, clientInfo requestmeta.ClientInfo) error
- func (s *Service) CheckRefreshToken(ctx context.Context, clientInfo requestmeta.ClientInfo) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrRateLimited = errors.New("rate limited")
Functions ¶
This section is empty.
Types ¶
type RateLimitedError ¶
func (RateLimitedError) Error ¶
func (e RateLimitedError) Error() string
func (RateLimitedError) Unwrap ¶
func (e RateLimitedError) Unwrap() error
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is a fixed-window limiter for the single API replica. Entries expire at the end of their configured window and are removed during checks.
func NewService ¶
func NewService(cfg config.AuthRateLimitConfig) *Service
func (*Service) CheckDeviceCodeCreate ¶
func (s *Service) CheckDeviceCodeCreate(ctx context.Context, clientInfo requestmeta.ClientInfo) error
func (*Service) CheckDeviceDecision ¶
func (s *Service) CheckDeviceDecision(ctx context.Context, username string, clientInfo requestmeta.ClientInfo) error
func (*Service) CheckDeviceTokenExchange ¶
func (s *Service) CheckDeviceTokenExchange(ctx context.Context, clientInfo requestmeta.ClientInfo) error
func (*Service) CheckLogout ¶
func (s *Service) CheckLogout(ctx context.Context, clientInfo requestmeta.ClientInfo) error
func (*Service) CheckRefreshToken ¶
func (s *Service) CheckRefreshToken(ctx context.Context, clientInfo requestmeta.ClientInfo) error
Click to show internal directories.
Click to hide internal directories.