From 4143a7b2c85ffbe34a92aed580e824f23558fa82 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Mon, 15 Jul 2024 00:46:36 +0800 Subject: [PATCH] :arrow_up: Support new auth api --- .idea/workspace.xml | 84 ++++++++++++--------------------------- pkg/internal/grpc/auth.go | 2 +- 2 files changed, 26 insertions(+), 60 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 04851f0..40a2ae6 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -6,41 +6,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { + "keyToString": { + "DefaultGoTemplateProperty": "Go File", + "Go Build.Backend.executor": "Run", + "Go 构建.Backend.executor": "Run", + "RunOnceActivity.ShowReadmeOnStart": "true", + "RunOnceActivity.go.formatter.settings.were.checked": "true", + "RunOnceActivity.go.migrated.go.modules.settings": "true", + "RunOnceActivity.go.modules.automatic.dependencies.download": "true", + "RunOnceActivity.go.modules.go.list.on.any.changes.was.set": "true", + "git-widget-placeholder": "refactor/dealer", + "go.import.settings.migrated": "true", + "go.sdk.automatically.set": "true", + "last_opened_file_path": "/Users/littlesheep/Documents/Projects/Hydrogen/Passport/web/src/components/admin", + "node.js.detected.package.eslint": "true", + "node.js.selected.package.eslint": "(autodetect)", + "nodejs_package_manager_path": "npm", + "run.code.analysis.last.selected.profile": "pProject Default", + "settings.editor.selected.configurable": "preferences.pluginManager", + "ts.external.directory.path": "/Users/littlesheep/Documents/Projects/Hydrogen/Passport/web/node_modules/typescript/lib", + "vue.rearranger.settings.migration": "true" }, - "keyToStringList": { - "DatabaseDriversLRU": [ - "postgresql" + "keyToStringList": { + "DatabaseDriversLRU": [ + "postgresql" ] } -}]]> +} diff --git a/pkg/internal/grpc/auth.go b/pkg/internal/grpc/auth.go index 4b74321..2d8233f 100644 --- a/pkg/internal/grpc/auth.go +++ b/pkg/internal/grpc/auth.go @@ -46,7 +46,7 @@ func (v *Server) Authenticate(_ context.Context, in *exproto.AuthRequest) (*expr } } -func (v *Server) CheckPerm(_ context.Context, in *exproto.CheckPermRequest) (*exproto.CheckPermReply, error) { +func (v *Server) EnsurePermGranted(_ context.Context, in *exproto.CheckPermRequest) (*exproto.CheckPermReply, error) { claims, err := services.DecodeJwt(in.GetToken()) if err != nil { return nil, err