docs: complete console application scope acceptance and deployment guidance
This commit is contained in:
@@ -1,12 +1,13 @@
|
||||
package httpserver
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
"git.yuntuo.hk/k2safe/orbit/internal/consoleauth"
|
||||
"git.yuntuo.hk/k2safe/orbit/internal/fault"
|
||||
core "git.yuntuo.hk/k2safe/orbit/model"
|
||||
"git.yuntuo.hk/k2safe/orbit/platform/auth"
|
||||
"net/http"
|
||||
"strings"
|
||||
)
|
||||
|
||||
type consoleScopeKey struct{}
|
||||
@@ -40,6 +41,9 @@ func consoleScopePath(r *http.Request) bool {
|
||||
}
|
||||
|
||||
func RegisterConsoleScopes(server *http.Server, store consoleauth.Scopes) {
|
||||
if server == nil {
|
||||
return
|
||||
}
|
||||
mux, ok := server.Handler.(*http.ServeMux)
|
||||
if !ok || store == nil {
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user