Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
civil-bigdata
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
civil
civil-bigdata
Commits
f7f0a1c2
Commit
f7f0a1c2
authored
Jan 06, 2022
by
袁伟铭
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改token认证获取
parent
26717455
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
6 additions
and
24 deletions
+6
-24
oauth-server/src/main/java/com/zq/oauth/config/TokenProvider.java
+1
-4
open-server/src/main/java/com/zq/open/config/TokenProvider.java
+1
-4
portal-server/src/main/java/com/zq/portal/config/TokenProvider.java
+1
-4
resource-server/src/main/java/com/zq/resource/config/TokenProvider.java
+1
-4
sys-server/src/main/java/com/zq/system/config/security/TokenProvider.java
+1
-4
user-server/src/main/java/com/zq/user/config/TokenProvider.java
+1
-4
No files found.
oauth-server/src/main/java/com/zq/oauth/config/TokenProvider.java
View file @
f7f0a1c2
...
@@ -89,10 +89,7 @@ public class TokenProvider implements InitializingBean {
...
@@ -89,10 +89,7 @@ public class TokenProvider implements InitializingBean {
}
}
public
Authentication
getAuthentication
(
String
token
)
{
public
Authentication
getAuthentication
(
String
token
)
{
Claims
claims
=
Jwts
.
parser
()
Claims
claims
=
getClaims
(
token
);
.
setSigningKey
(
DatatypeConverter
.
parseBase64Binary
(
properties
.
getBase64Secret
()))
.
parseClaimsJws
(
token
)
.
getBody
();
// fix bug: 当前用户如果没有任何权限时,在输入用户名后,刷新验证码会抛IllegalArgumentException
// fix bug: 当前用户如果没有任何权限时,在输入用户名后,刷新验证码会抛IllegalArgumentException
Object
authoritiesStr
=
claims
.
get
(
AUTHORITIES_KEY
);
Object
authoritiesStr
=
claims
.
get
(
AUTHORITIES_KEY
);
...
...
open-server/src/main/java/com/zq/open/config/TokenProvider.java
View file @
f7f0a1c2
...
@@ -89,10 +89,7 @@ public class TokenProvider implements InitializingBean {
...
@@ -89,10 +89,7 @@ public class TokenProvider implements InitializingBean {
}
}
public
Authentication
getAuthentication
(
String
token
)
{
public
Authentication
getAuthentication
(
String
token
)
{
Claims
claims
=
Jwts
.
parser
()
Claims
claims
=
getClaims
(
token
);
.
setSigningKey
(
DatatypeConverter
.
parseBase64Binary
(
properties
.
getBase64Secret
()))
.
parseClaimsJws
(
token
)
.
getBody
();
// fix bug: 当前用户如果没有任何权限时,在输入用户名后,刷新验证码会抛IllegalArgumentException
// fix bug: 当前用户如果没有任何权限时,在输入用户名后,刷新验证码会抛IllegalArgumentException
Object
authoritiesStr
=
claims
.
get
(
AUTHORITIES_KEY
);
Object
authoritiesStr
=
claims
.
get
(
AUTHORITIES_KEY
);
...
...
portal-server/src/main/java/com/zq/portal/config/TokenProvider.java
View file @
f7f0a1c2
...
@@ -89,10 +89,7 @@ public class TokenProvider implements InitializingBean {
...
@@ -89,10 +89,7 @@ public class TokenProvider implements InitializingBean {
}
}
public
Authentication
getAuthentication
(
String
token
)
{
public
Authentication
getAuthentication
(
String
token
)
{
Claims
claims
=
Jwts
.
parser
()
Claims
claims
=
getClaims
(
token
);
.
setSigningKey
(
DatatypeConverter
.
parseBase64Binary
(
properties
.
getBase64Secret
()))
.
parseClaimsJws
(
token
)
.
getBody
();
// fix bug: 当前用户如果没有任何权限时,在输入用户名后,刷新验证码会抛IllegalArgumentException
// fix bug: 当前用户如果没有任何权限时,在输入用户名后,刷新验证码会抛IllegalArgumentException
Object
authoritiesStr
=
claims
.
get
(
AUTHORITIES_KEY
);
Object
authoritiesStr
=
claims
.
get
(
AUTHORITIES_KEY
);
...
...
resource-server/src/main/java/com/zq/resource/config/TokenProvider.java
View file @
f7f0a1c2
...
@@ -89,10 +89,7 @@ public class TokenProvider implements InitializingBean {
...
@@ -89,10 +89,7 @@ public class TokenProvider implements InitializingBean {
}
}
public
Authentication
getAuthentication
(
String
token
)
{
public
Authentication
getAuthentication
(
String
token
)
{
Claims
claims
=
Jwts
.
parser
()
Claims
claims
=
getClaims
(
token
);
.
setSigningKey
(
DatatypeConverter
.
parseBase64Binary
(
properties
.
getBase64Secret
()))
.
parseClaimsJws
(
token
)
.
getBody
();
// fix bug: 当前用户如果没有任何权限时,在输入用户名后,刷新验证码会抛IllegalArgumentException
// fix bug: 当前用户如果没有任何权限时,在输入用户名后,刷新验证码会抛IllegalArgumentException
Object
authoritiesStr
=
claims
.
get
(
AUTHORITIES_KEY
);
Object
authoritiesStr
=
claims
.
get
(
AUTHORITIES_KEY
);
...
...
sys-server/src/main/java/com/zq/system/config/security/TokenProvider.java
View file @
f7f0a1c2
...
@@ -91,10 +91,7 @@ public class TokenProvider implements InitializingBean {
...
@@ -91,10 +91,7 @@ public class TokenProvider implements InitializingBean {
}
}
public
Authentication
getAuthentication
(
String
token
)
{
public
Authentication
getAuthentication
(
String
token
)
{
Claims
claims
=
Jwts
.
parser
()
Claims
claims
=
getClaims
(
token
);
.
setSigningKey
(
DatatypeConverter
.
parseBase64Binary
(
properties
.
getBase64Secret
()))
.
parseClaimsJws
(
token
)
.
getBody
();
// fix bug: 当前用户如果没有任何权限时,在输入用户名后,刷新验证码会抛IllegalArgumentException
// fix bug: 当前用户如果没有任何权限时,在输入用户名后,刷新验证码会抛IllegalArgumentException
Object
authoritiesStr
=
claims
.
get
(
AUTHORITIES_KEY
);
Object
authoritiesStr
=
claims
.
get
(
AUTHORITIES_KEY
);
...
...
user-server/src/main/java/com/zq/user/config/TokenProvider.java
View file @
f7f0a1c2
...
@@ -89,10 +89,7 @@ public class TokenProvider implements InitializingBean {
...
@@ -89,10 +89,7 @@ public class TokenProvider implements InitializingBean {
}
}
public
Authentication
getAuthentication
(
String
token
)
{
public
Authentication
getAuthentication
(
String
token
)
{
Claims
claims
=
Jwts
.
parser
()
Claims
claims
=
getClaims
(
token
);
.
setSigningKey
(
DatatypeConverter
.
parseBase64Binary
(
properties
.
getBase64Secret
()))
.
parseClaimsJws
(
token
)
.
getBody
();
// fix bug: 当前用户如果没有任何权限时,在输入用户名后,刷新验证码会抛IllegalArgumentException
// fix bug: 当前用户如果没有任何权限时,在输入用户名后,刷新验证码会抛IllegalArgumentException
Object
authoritiesStr
=
claims
.
get
(
AUTHORITIES_KEY
);
Object
authoritiesStr
=
claims
.
get
(
AUTHORITIES_KEY
);
...
...
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