Documentation
¶
Index ¶
- Constants
- type OIDCProvider
- func (p *OIDCProvider) BuildLogoutURL(idToken string) (string, error)
- func (p *OIDCProvider) GetOAuth2State(redirectURL string) (*oauth2State, string, error)
- func (p *OIDCProvider) Init(ctx context.Context) error
- func (p *OIDCProvider) OAuth2Config() *oauth2.Config
- func (p *OIDCProvider) ParseOAuth2State(raw string) (*oauth2State, error)
- func (p *OIDCProvider) Verify(ctx context.Context, rawIDToken string) (*oidc.IDToken, error)
- type Server
- func (s *Server) AddAuthRoutes(r *gin.RouterGroup)
- func (s *Server) AddOAuth2Routes(r *gin.RouterGroup)
- func (s *Server) AddRoutes(router *gin.Engine)
- func (s *Server) LogError(sError *errors.ServerError, msg string, keysAndValues ...interface{})
- func (s *Server) Login(c *gin.Context)
- func (s *Server) Logout(c *gin.Context)
- func (s *Server) OAuth2Callback(c *gin.Context)
- func (s *Server) OAuth2Login(c *gin.Context)
- func (s *Server) RefreshToken(c *gin.Context)
Constants ¶
View Source
const BasicAuthRefreshTokenLifetime = 24 * time.Hour
After 24 hours, the user will need to enter his credentials (password) again.
View Source
const OIDCAuthRefreshTokenLifetime = 30 * time.Minute
After 30 minutes, the user will be redirected to the OIDC provider to authenticate again. This does NOT mean that the user will need to enter his credentials again, as the OIDC provider is likely to rely on its own cookies.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OIDCProvider ¶ added in v0.2.0
type OIDCProvider struct {
// contains filtered or unexported fields
}
func NewOIDCProvider ¶ added in v0.2.0
func (*OIDCProvider) BuildLogoutURL ¶ added in v0.2.0
func (p *OIDCProvider) BuildLogoutURL(idToken string) (string, error)
func (*OIDCProvider) GetOAuth2State ¶ added in v0.2.0
func (p *OIDCProvider) GetOAuth2State(redirectURL string) (*oauth2State, string, error)
func (*OIDCProvider) OAuth2Config ¶ added in v0.2.0
func (p *OIDCProvider) OAuth2Config() *oauth2.Config
func (*OIDCProvider) ParseOAuth2State ¶ added in v0.2.0
func (p *OIDCProvider) ParseOAuth2State(raw string) (*oauth2State, error)
type Server ¶ added in v0.2.0
type Server struct {
// contains filtered or unexported fields
}
func NewServer ¶
func NewServer( logger logr.Logger, k8sClient dynamic.Interface, traceflowRequestsHandler traceflow.RequestsHandler, k8sProxyHandler http.Handler, antreaSvcRequestsHandler antreasvc.RequestsHandler, passwordStore password.Store, tokenManager auth.TokenManager, oidcProvider *OIDCProvider, config *serverconfig.Config, ) *Server
func (*Server) AddAuthRoutes ¶ added in v0.2.0
func (s *Server) AddAuthRoutes(r *gin.RouterGroup)
func (*Server) AddOAuth2Routes ¶ added in v0.2.0
func (s *Server) AddOAuth2Routes(r *gin.RouterGroup)
func (*Server) LogError ¶ added in v0.2.0
func (s *Server) LogError(sError *errors.ServerError, msg string, keysAndValues ...interface{})
func (*Server) OAuth2Callback ¶ added in v0.2.0
func (*Server) OAuth2Login ¶ added in v0.2.0
func (*Server) RefreshToken ¶ added in v0.2.0
Click to show internal directories.
Click to hide internal directories.