mirror of
https://github.com/steveiliop56/tinyauth.git
synced 2025-10-28 12:45:47 +00:00
Feat/totp (#45)
* wip * feat: finalize totp gen code * refactor: split login screen and forms * feat: add totp logic and ui * refactor: make totp pending expiry time fixed * refactor: skip all checks when disable continue is enabled * fix: fix cli not exiting on invalid input
This commit is contained in:
@@ -15,8 +15,9 @@ type LoginRequest struct {
|
||||
|
||||
// User is the struct for a user
|
||||
type User struct {
|
||||
Username string
|
||||
Password string
|
||||
Username string
|
||||
Password string
|
||||
TotpSecret string
|
||||
}
|
||||
|
||||
// Users is a list of users
|
||||
@@ -58,10 +59,11 @@ type Config struct {
|
||||
|
||||
// UserContext is the context for the user
|
||||
type UserContext struct {
|
||||
Username string
|
||||
IsLoggedIn bool
|
||||
OAuth bool
|
||||
Provider string
|
||||
Username string
|
||||
IsLoggedIn bool
|
||||
OAuth bool
|
||||
Provider string
|
||||
TotpPending bool
|
||||
}
|
||||
|
||||
// APIConfig is the configuration for the API
|
||||
@@ -114,8 +116,9 @@ type UnauthorizedQuery struct {
|
||||
|
||||
// SessionCookie is the cookie for the session (exculding the expiry)
|
||||
type SessionCookie struct {
|
||||
Username string
|
||||
Provider string
|
||||
Username string
|
||||
Provider string
|
||||
TotpPending bool
|
||||
}
|
||||
|
||||
// TinyauthLabels is the labels for the tinyauth container
|
||||
@@ -147,4 +150,10 @@ type Status struct {
|
||||
DisableContinue bool `json:"disableContinue"`
|
||||
Title string `json:"title"`
|
||||
GenericName string `json:"genericName"`
|
||||
TotpPending bool `json:"totpPending"`
|
||||
}
|
||||
|
||||
// Totp request
|
||||
type Totp struct {
|
||||
Code string `json:"code"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user