Documentation ¶
Index ¶
- type Bcrypt
- type Code
- type CookieStore
- func (c *CookieStore) DestroyCookie(wr http.ResponseWriter, cookieName string)
- func (c *CookieStore) GetCookieDecrypted(req *http.Request, cookieName string) (string, error)
- func (c *CookieStore) SetCookieAccessToken(wr http.ResponseWriter, accessToken string)
- func (c *CookieStore) SetCookieCsrfToken(wr http.ResponseWriter, csrfToken string)
- func (c *CookieStore) SetCookieOAuth2State(wr http.ResponseWriter, state string)
- func (c *CookieStore) SetCookieRefreshToken(wr http.ResponseWriter, refreshToken string)
- type Email
- type IBcrypt
- type ICode
- type ICookieStore
- type IEmail
- type IJwt
- type Jwt
- type Oauth
- type OauthProvider
- type OauthProviderConfig
- type OauthUserInformation
- type ValidateError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Code ¶
type Code struct { }
func (*Code) GenerateCsrfToken ¶
func (*Code) GenerateDigitCode ¶
func (*Code) GenerateStateOauth ¶
type CookieStore ¶
type CookieStore struct { AccessTokenCookieName string RefreshTokenCookieName string CsrfTokenCookieName string OauthStateCookieName string DefaultExpiration time.Time }
func NewCookieStore ¶
func NewCookieStore() *CookieStore
func (*CookieStore) DestroyCookie ¶
func (c *CookieStore) DestroyCookie(wr http.ResponseWriter, cookieName string)
func (*CookieStore) GetCookieDecrypted ¶
func (*CookieStore) SetCookieAccessToken ¶
func (c *CookieStore) SetCookieAccessToken(wr http.ResponseWriter, accessToken string)
func (*CookieStore) SetCookieCsrfToken ¶
func (c *CookieStore) SetCookieCsrfToken(wr http.ResponseWriter, csrfToken string)
func (*CookieStore) SetCookieOAuth2State ¶
func (c *CookieStore) SetCookieOAuth2State(wr http.ResponseWriter, state string)
func (*CookieStore) SetCookieRefreshToken ¶
func (c *CookieStore) SetCookieRefreshToken(wr http.ResponseWriter, refreshToken string)
type Email ¶
type ICookieStore ¶
type ICookieStore interface { SetCookieAccessToken(wr http.ResponseWriter, accessToken string) SetCookieRefreshToken(wr http.ResponseWriter, refreshToken string) SetCookieCsrfToken(wr http.ResponseWriter, csrfToken string) SetCookieOAuth2State(wr http.ResponseWriter, state string) GetCookieDecrypted(req *http.Request, cookieName string) (string, error) DestroyCookie(wr http.ResponseWriter, cookieName string) }
type Jwt ¶
type Jwt struct { Secret string ExpirationTimeAccess time.Duration ExpirationTimeRefresh time.Duration ExpirationTimeResetPassword time.Duration ExpirationTimeEmailVerification time.Duration }
func (*Jwt) GenerateToken ¶
type Oauth ¶
type Oauth struct {
Providers []OauthProvider
}
func (*Oauth) GetProvider ¶
func (o *Oauth) GetProvider(provider string) (OauthProvider, error)
func (*Oauth) GetUserInformation ¶
func (o *Oauth) GetUserInformation(provider string, userInformation map[string]interface{}) (OauthUserInformation, error)
type OauthProvider ¶
type OauthProvider struct { Provider string Config OauthProviderConfig }
type OauthProviderConfig ¶
type OauthUserInformation ¶
type ValidateError ¶
func Validate ¶
func Validate(i interface{}) (errors []*ValidateError)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.