mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-03 12:30:19 +08:00
feat: support webauthn (#407)
* feat: support webauthn * Update init.go * Update user_webauthn.go * Update UserEditPage.js * Update WebauthnCredentialTable.js * Update LoginPage.js Co-authored-by: Gucheng <85475922+nomeguy@users.noreply.github.com>
This commit is contained in:

committed by
GitHub

parent
208dc11d25
commit
7f3b2500b3
@ -109,6 +109,10 @@ func getUrlPath(urlPath string) string {
|
||||
return "/api/login/oauth"
|
||||
}
|
||||
|
||||
if strings.HasPrefix(urlPath, "/api/webauthn") {
|
||||
return "/api/webauthn"
|
||||
}
|
||||
|
||||
return urlPath
|
||||
}
|
||||
|
||||
|
@ -191,4 +191,9 @@ func initAPI() {
|
||||
beego.Router("/cas/:organization/:application/p3/proxyValidate", &controllers.RootController{}, "GET:CasP3ServiceAndProxyValidate")
|
||||
beego.Router("/cas/:organization/:application/samlValidate", &controllers.RootController{}, "POST:SamlValidate")
|
||||
|
||||
beego.Router("/api/webauthn/signup/begin", &controllers.ApiController{}, "Get:WebAuthnSignupBegin")
|
||||
beego.Router("/api/webauthn/signup/finish", &controllers.ApiController{}, "Post:WebAuthnSignupFinish")
|
||||
beego.Router("/api/webauthn/signin/begin", &controllers.ApiController{}, "Get:WebAuthnSigninBegin")
|
||||
beego.Router("/api/webauthn/signin/finish", &controllers.ApiController{}, "Post:WebAuthnSigninFinish")
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user