Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
wang
/
golang-open-platform
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
0e2b6514
authored
Mar 15, 2021
by
wang
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
……
parent
b56f85e5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
open/validate.go
open/validate.go
View file @
0e2b6514
...
...
@@ -105,16 +105,18 @@ func (this *openValidate) permissionValidate(interfaceName string) error{
//check验证
func
(
this
*
openValidate
)
Check
(
ctx
*
gin
.
Context
,
interfaceName
string
)
error
{
err
:=
this
.
ipValidate
(
ctx
,
this
.
business
.
token
)
tokenStr
:=
this
.
business
.
token
//验证token的合法性
err
:=
this
.
exitValidate
(
tokenStr
)
if
(
err
!=
nil
){
return
err
}
tokenStr
:=
this
.
business
.
token
//验证token的合法性
err
=
this
.
exitValidate
(
tokenStr
)
err
=
this
.
ipValidate
(
ctx
,
this
.
business
.
token
)
if
(
err
!=
nil
){
return
err
}
//接口权限验证
err
=
this
.
permissionValidate
(
interfaceName
)
if
(
err
!=
nil
){
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment