Documentation ¶
Index ¶
- func CompareHashAndPassword(hash, password string) error
- func ComposeConfirmationPayload(name, token string, expiresAt time.Time, r *http.Request) *notificator.ConfirmationPayload
- func ComposeRecoveryPayload(name, token string, expiresAt time.Time, r *http.Request) *notificator.RecoveryPayload
- func CreateAuthToken(user *data.User, r *http.Request, w http.ResponseWriter) (*resources.AuthToken, error)
- func GenerateID() int64
- func GenerateToken(secret string) (string, error)
- func HashPassword(password string) (string, error)
- func InvalidateRefreshTokenCookie(w http.ResponseWriter, cfg *config.RefreshCookieConfig)
- func RefreshAuthToken(refreshToken *data.RefreshToken, r *http.Request, w http.ResponseWriter) (*resources.AuthToken, error)
- func SendConfirmationEmail(user *data.User, r *http.Request) error
- func VerifyToken(token, secret string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompareHashAndPassword ¶
func ComposeConfirmationPayload ¶
func ComposeConfirmationPayload(name, token string, expiresAt time.Time, r *http.Request) *notificator.ConfirmationPayload
func ComposeRecoveryPayload ¶
func ComposeRecoveryPayload(name, token string, expiresAt time.Time, r *http.Request) *notificator.RecoveryPayload
func CreateAuthToken ¶
func GenerateID ¶
func GenerateID() int64
func GenerateToken ¶
func HashPassword ¶
func InvalidateRefreshTokenCookie ¶
func InvalidateRefreshTokenCookie(w http.ResponseWriter, cfg *config.RefreshCookieConfig)
func RefreshAuthToken ¶
func RefreshAuthToken(refreshToken *data.RefreshToken, r *http.Request, w http.ResponseWriter) (*resources.AuthToken, error)
func VerifyToken ¶
Types ¶
This section is empty.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.