Documentation ¶
Index ¶
- Variables
- func Authentication(w http.ResponseWriter, r *http.Request)
- func Authentication2FA(w http.ResponseWriter, r *http.Request)
- func InitializeAuthRouter(router *mux.Router)
- func Refresh(w http.ResponseWriter, r *http.Request)
- func TwoFA(w http.ResponseWriter, r *http.Request)
- func TwoFATest(w http.ResponseWriter, r *http.Request)
- type RefreshResponse
- type Request
- type RequestWith2FA
- type Response
- type TwoFARequest
- type TwoFATestRequest
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // TokenFactory instance used for generating and validating token TokenFactory helper.TokenFactory )
Functions ¶
func Authentication ¶
func Authentication(w http.ResponseWriter, r *http.Request)
Authentication serve normal authentication
func Authentication2FA ¶
func Authentication2FA(w http.ResponseWriter, r *http.Request)
Authentication2FA serve authentication with 2fa secret key
func InitializeAuthRouter ¶
InitializeAuthRouter initializes the module's repository and routing
Types ¶
type RefreshResponse ¶
type RefreshResponse struct {
AccessToken string `json:"access_token"`
}
RefreshResponse a model for responding successful refresh
type RequestWith2FA ¶
type RequestWith2FA struct { Email string `json:"email"` Passphrase string `json:"passphrase"` SecretKey string `json:"2FA_recovery_code"` }
RequestWith2FA a model for authentication using 2fa secret key
type Response ¶
type Response struct { AccessToken string `json:"access_token"` RefreshToken string `json:"refresh_token"` }
Response a model for responding successful authentication
type TwoFARequest ¶
TwoFARequest model for sending 2FA authentication
type TwoFATestRequest ¶
TwoFATestRequest model for sending 2FA authentication
Click to show internal directories.
Click to hide internal directories.