Oauth2 support

This commit is contained in:
Jamie Curnow committed 2024-11-07 07:24:38 +10:00
1 parent f23299f793
commit 208037946f
25 files changed
+529 -30

No files matched your search

-6
View File
@@ -70,8 +70,6 @@ func NewToken() func(http.ResponseWriter, *http.Request) {
switch payload.Type {
case "ldap":
newTokenLDAP(w, r, payload)
case "oidc":
newTokenOIDC(w, r, payload)
case "local":
newTokenLocal(w, r, payload)
}
@@ -199,10 +197,6 @@ func newTokenLDAP(w http.ResponseWriter, r *http.Request, payload tokenPayload)
}
}
func newTokenOIDC(w http.ResponseWriter, r *http.Request, _ tokenPayload) {
h.ResultErrorJSON(w, r, http.StatusInternalServerError, "NOT YET SUPPORTED", nil)
}
// RefreshToken an existing token by given them a new one with the same claims
// Route: POST /auth/refresh
func RefreshToken() func(http.ResponseWriter, *http.Request) {