Documentation ¶
Index ¶
- Constants
- func HTTPErrorHandler(err error, c echo.Context)
- func LoginRequired(next echo.HandlerFunc) echo.HandlerFunc
- func Path(path string) string
- func RateLimit(next echo.HandlerFunc) echo.HandlerFunc
- func Run() error
- func URI(c echo.Context, name string) string
- type FakeTLSTransport
- type GlobusIDTokenClaims
- type GlobusIdentities
- type GlobusIdentity
- type GlobusIdentityProvider
- type Handler
- func (h *Handler) AddSSHPubKey(c echo.Context) error
- func (h *Handler) ApiKey(c echo.Context) error
- func (h *Handler) Captcha(c echo.Context) error
- func (h *Handler) ChangePassword(c echo.Context) error
- func (h *Handler) ConsentGet(c echo.Context) error
- func (h *Handler) ConsentPost(c echo.Context) error
- func (h *Handler) CreateAccount(c echo.Context) error
- func (h *Handler) ForgotPassword(c echo.Context) error
- func (h *Handler) GlobusRedirect(c echo.Context) error
- func (h *Handler) GlobusSignup(c echo.Context) error
- func (h *Handler) HydraError(c echo.Context) error
- func (h *Handler) Index(c echo.Context) error
- func (h *Handler) LoginGet(c echo.Context) error
- func (h *Handler) LoginOAuthGet(c echo.Context) error
- func (h *Handler) LoginOAuthPost(c echo.Context) error
- func (h *Handler) LoginPost(c echo.Context) error
- func (h *Handler) Logout(c echo.Context) error
- func (h *Handler) ModifyOTPTokens(c echo.Context) error
- func (h *Handler) NewSSHPubKey(c echo.Context) error
- func (h *Handler) OTPTokens(c echo.Context) error
- func (h *Handler) ResetPassword(c echo.Context) error
- func (h *Handler) SSHPubKey(c echo.Context) error
- func (h *Handler) SetupAccount(c echo.Context) error
- func (h *Handler) SetupRoutes(e *echo.Echo)
- func (h *Handler) Signup(c echo.Context) error
- func (h *Handler) TwoFactorAuth(c echo.Context) error
- type TemplateRenderer
Constants ¶
View Source
const ( CookieKeySession = "mokey-sessck" CookieKeyState = "state" CookieKeyAuthenticated = "authenticated" CookieKeySID = "sid" CookieKeyUser = "user" CookieKeyWYAF = "wyaf" CookieKeyGlobus = "globus" CookieKeyGlobusUsername = "globus_username" ContextKeyUser = "user" ContextKeyIPAClient = "ipa" ContextKeyApi = "apikey" )
Variables ¶
This section is empty.
Functions ¶
func HTTPErrorHandler ¶
func HTTPErrorHandler(err error, c echo.Context)
Render custom error templates if available
func LoginRequired ¶
func LoginRequired(next echo.HandlerFunc) echo.HandlerFunc
LoginRequired ensure the user has logged in and has a valid FreeIPA session. Stores the ipa.UserRecord in the request context
Types ¶
type FakeTLSTransport ¶ added in v0.5.3
type FakeTLSTransport struct {
T http.RoundTripper
}
type GlobusIDTokenClaims ¶
type GlobusIDTokenClaims struct { Aud string `json:"aud"` IdentityProviderDisplayName string `json:"identity_provider_display_name"` Sub string `json:"sub"` ISS string `json:"iss"` PreferredUsername string `json:"preferred_username"` AtHash string `json:"at_hash"` IdentityProvider string `json:"identity_provider"` Exp int `json:"exp"` IAt int `json:"iat"` Organization string `json:"organization"` Email string `json:"email"` Name string `json:"name"` }
type GlobusIdentities ¶
type GlobusIdentities struct { Identities []*GlobusIdentity `json:"identities"` Included struct { IdentityProviders []*GlobusIdentityProvider `json:"identity_providers"` } `json:"included"` }
type GlobusIdentity ¶
type GlobusIdentity struct { Active bool `json:"active"` Aud []string `json:"aud"` ClientID string `json:"client_id"` Email string `json:"email"` Exp int `json:"exp"` IAt int `json:"iat"` NBF int `json:"nbf"` IdentitiesSet []string `json:"identities_set"` IdentityProvider string `json:"identity_provider"` ISS string `json:"iss"` Name string `json:"name"` Scope string `json:"scope"` Sub string `json:"sub"` Status string `json:"status"` TokenType string `json:"token_type"` Username string `json:"username"` Organization string `json:"organization"` ID string `json:"id"` }
func (*GlobusIdentity) CleanUsername ¶
func (g *GlobusIdentity) CleanUsername() string
type GlobusIdentityProvider ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func (*Handler) AddSSHPubKey ¶
func (*Handler) ChangePassword ¶
func (*Handler) ConsentGet ¶
func (*Handler) ConsentPost ¶
func (*Handler) CreateAccount ¶
Create new user account POST handler
func (*Handler) ForgotPassword ¶
func (*Handler) GlobusRedirect ¶
func (*Handler) GlobusSignup ¶
func (*Handler) HydraError ¶
func (*Handler) LoginOAuthGet ¶
func (*Handler) LoginOAuthPost ¶
func (*Handler) ModifyOTPTokens ¶
func (*Handler) NewSSHPubKey ¶
func (*Handler) ResetPassword ¶
func (*Handler) SetupAccount ¶
func (*Handler) SetupRoutes ¶
func (h *Handler) SetupRoutes(e *echo.Echo)
func (*Handler) TwoFactorAuth ¶
type TemplateRenderer ¶
type TemplateRenderer struct {
// contains filtered or unexported fields
}
Template renderer
func NewTemplateRenderer ¶
func NewTemplateRenderer(dir string) (*TemplateRenderer, error)
Create a new template renderer. dir is the path to template files
Click to show internal directories.
Click to hide internal directories.