mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-07-11 22:49:17 +02:00
Merge pull request 'feat: migrate TOTP secrets to keying
' (#6074) from gusted/forgejo-totp-keying into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6074 Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
This commit is contained in:
commit
22d08c62f1
18 changed files with 149 additions and 47 deletions
|
@ -45,8 +45,12 @@ func Init(ikm []byte) {
|
|||
// This must be a hardcoded string and must not be arbitrarily constructed.
|
||||
type Context string
|
||||
|
||||
// Used for the `push_mirror` table.
|
||||
var ContextPushMirror Context = "pushmirror"
|
||||
var (
|
||||
// Used for the `push_mirror` table.
|
||||
ContextPushMirror Context = "pushmirror"
|
||||
// Used for the `two_factor` table.
|
||||
ContextTOTP Context = "totp"
|
||||
)
|
||||
|
||||
// Derive *the* key for a given context, this is a determistic function. The
|
||||
// same key will be provided for the same context.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue