parent
0932a10fed
commit
f35c585edf
@ -0,0 +1,21 @@
|
||||
package authn
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/duo-labs/webauthn/webauthn"
|
||||
)
|
||||
|
||||
var Authn *webauthn.WebAuthn
|
||||
|
||||
func Init() {
|
||||
var err error
|
||||
Authn, 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
|
||||
RPIcon: "https://duo.com/logo.png", // Optional icon URL for your site
|
||||
})
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
}
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
package response
|
||||
|
||||
import "io"
|
||||
|
||||
// ContentResponse 获取文件内容类方法的通用返回值。
|
||||
// 有些上传策略需要重定向,
|
||||
// 有些直接写文件数据到浏览器
|
||||
type ContentResponse struct {
|
||||
Redirect bool
|
||||
Content io.ReadSeeker
|
||||
URL string
|
||||
}
|
Loading…
Reference in new issue