auth

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 26, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service represents the OAuth service

func NewService

func NewService(cfg *config.OAuthConfig, provider providers.OAuthProvider) (*Service, error)

NewService creates a new OAuth service

func (*Service) Authenticate

func (s *Service) Authenticate() func(http.Handler) http.Handler

Authenticate returns the authentication middleware

func (*Service) GetProvider

func (s *Service) GetProvider() providers.OAuthProvider

GetProvider returns the configured auth provider

func (*Service) OptionalAuthenticate

func (s *Service) OptionalAuthenticate() func(http.Handler) http.Handler

OptionalAuthenticate returns the optional authentication middleware

func (*Service) RegisterRoutes

func (s *Service) RegisterRoutes(mux *http.ServeMux)

RegisterRoutes registers all OAuth-related routes

func (*Service) WrapWithCors

func (s *Service) WrapWithCors(handler http.Handler) http.Handler

WrapWithCors wraps the mux with authentication middleware

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL