⬆️ Support new auth api

This commit is contained in:
2024-07-15 00:46:36 +08:00
parent 69fb9531cb
commit 4143a7b2c8
2 changed files with 26 additions and 60 deletions

View File

@ -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