File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed
src/java/main/com/cronos/onlinereview/util Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -96,7 +96,7 @@ workflows:
96
96
context : org-global
97
97
filters :
98
98
branches :
99
- only : [dev-circleci2, dev ]
99
+ only : [dev, 'hotfix/RS256-token' ]
100
100
- build-prod :
101
101
context : org-global
102
102
filters :
Original file line number Diff line number Diff line change 20
20
import java .util .Date ;
21
21
22
22
import org .apache .struts2 .ServletActionContext ;
23
- import org .apache .xerces . utils .Base64 ;
23
+ import org .apache .commons . codec . binary .Base64 ;
24
24
25
25
import com .fasterxml .jackson .databind .JsonNode ;
26
26
import com .fasterxml .jackson .databind .ObjectMapper ;
@@ -101,12 +101,13 @@ public JwtTokenUpdater check() throws Exception {
101
101
if (tokenSplit .length <= 1 ) {
102
102
valid = false ;
103
103
} else {
104
- StringBuffer payloadStr = new StringBuffer (tokenSplit [1 ]);
105
- while (payloadStr .length () % 4 != 0 ) {
104
+ // StringBuffer payloadStr = new StringBuffer(tokenSplit[1]);
105
+ /* while (payloadStr.length() % 4 != 0) {
106
106
payloadStr.append('=');
107
- }
108
-
109
- String payload = new String (Base64 .decode (payloadStr .toString ().getBytes (StandardCharsets .UTF_8 )));
107
+ }*/
108
+ //String payload = new String(Base64.decode(payloadStr.toString().getBytes(StandardCharsets.UTF_8)));
109
+
110
+ String payload = new String (Base64 .decodeBase64 (tokenSplit [1 ]), "UTF-8" );
110
111
JsonNode jsonNode = objectMapper .readValue (payload .toString (), JsonNode .class );
111
112
112
113
long exp = jsonNode .get ("exp" ).asLong ();
You can’t perform that action at this time.
0 commit comments