mirror of
https://github.com/halejohn/Cloudreve.git
synced 2026-01-26 09:34:57 +08:00
Test: thumbnail and authn / Modify: read thumbnail config from file
This commit is contained in:
@@ -5,11 +5,11 @@ import (
|
||||
"github.com/duo-labs/webauthn/webauthn"
|
||||
)
|
||||
|
||||
var Authn *webauthn.WebAuthn
|
||||
var AuthnInstance *webauthn.WebAuthn
|
||||
|
||||
func Init() {
|
||||
var err error
|
||||
Authn, err = webauthn.New(&webauthn.Config{
|
||||
AuthnInstance, err = webauthn.New(&webauthn.Config{
|
||||
RPDisplayName: "Duo Labs", // Display Name for your site
|
||||
RPID: "localhost", // Generally the FQDN for your site
|
||||
RPOrigin: "http://localhost:3000", // The origin URL for WebAuthn requests
|
||||
|
||||
15
pkg/authn/auth_test.go
Normal file
15
pkg/authn/auth_test.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package authn
|
||||
|
||||
import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestInit(t *testing.T) {
|
||||
asserts := assert.New(t)
|
||||
|
||||
asserts.NotPanics(func() {
|
||||
Init()
|
||||
})
|
||||
asserts.NotNil(AuthnInstance)
|
||||
}
|
||||
Reference in New Issue
Block a user