Documentation ¶
Index ¶
- type CookieAuth
- func (auth *CookieAuth) GetCSRFCookieName() string
- func (auth *CookieAuth) GetSSOEmailTokenCookieName() string
- func (auth *CookieAuth) GetSSOStateCookieName() string
- func (auth *CookieAuth) GetToken(r *http.Request) (console.TokenInfo, error)
- func (auth *CookieAuth) GetTokenCookieName() string
- func (auth *CookieAuth) RemoveSSOCookies(w http.ResponseWriter)
- func (auth *CookieAuth) RemoveTokenCookie(w http.ResponseWriter)
- func (auth *CookieAuth) SetCSRFCookie(w http.ResponseWriter, value string)
- func (auth *CookieAuth) SetSSOCookies(w http.ResponseWriter, state, emailToken string)
- func (auth *CookieAuth) SetTokenCookie(w http.ResponseWriter, tokenInfo console.TokenInfo)
- type CookieSettings
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CookieAuth ¶
type CookieAuth struct {
// contains filtered or unexported fields
}
CookieAuth handles cookie authorization.
func NewCookieAuth ¶
func NewCookieAuth(settings, csrfSettings, ssoStateSettings, ssoEmailTokenSettings CookieSettings, domain string) *CookieAuth
NewCookieAuth create new cookie authorization with provided settings.
func (*CookieAuth) GetCSRFCookieName ¶
func (auth *CookieAuth) GetCSRFCookieName() string
GetCSRFCookieName returns the name of the cookie storing the CSRF token.
func (*CookieAuth) GetSSOEmailTokenCookieName ¶
func (auth *CookieAuth) GetSSOEmailTokenCookieName() string
GetSSOEmailTokenCookieName returns the name of the cookie storing the SSO email token.
func (*CookieAuth) GetSSOStateCookieName ¶
func (auth *CookieAuth) GetSSOStateCookieName() string
GetSSOStateCookieName returns the name of the cookie storing the SSO state.
func (*CookieAuth) GetTokenCookieName ¶ added in v1.58.1
func (auth *CookieAuth) GetTokenCookieName() string
GetTokenCookieName returns the name of the cookie storing the session token.
func (*CookieAuth) RemoveSSOCookies ¶
func (auth *CookieAuth) RemoveSSOCookies(w http.ResponseWriter)
RemoveSSOCookies removes SSO cookies that are not accessible from js.
func (*CookieAuth) RemoveTokenCookie ¶ added in v0.31.6
func (auth *CookieAuth) RemoveTokenCookie(w http.ResponseWriter)
RemoveTokenCookie removes auth cookie that is not accessible from js.
func (*CookieAuth) SetCSRFCookie ¶
func (auth *CookieAuth) SetCSRFCookie(w http.ResponseWriter, value string)
SetCSRFCookie sets parametrized CSRF cookie that is not accessible from js.
func (*CookieAuth) SetSSOCookies ¶
func (auth *CookieAuth) SetSSOCookies(w http.ResponseWriter, state, emailToken string)
SetSSOCookies sets parametrized SSO cookies that are not accessible from js.
func (*CookieAuth) SetTokenCookie ¶
func (auth *CookieAuth) SetTokenCookie(w http.ResponseWriter, tokenInfo console.TokenInfo)
SetTokenCookie sets parametrized token cookie that is not accessible from js.
type CookieSettings ¶
CookieSettings variable cookie settings.