refactored variable names
This commit is contained in:
parent
ea4fbe920c
commit
674471df16
|
@ -44,21 +44,21 @@ public class StaticJWTController extends BaseController {
|
||||||
@RequestMapping(value = "/parser", method = GET)
|
@RequestMapping(value = "/parser", method = GET)
|
||||||
public JwtResponse parser(@RequestParam String jwt) throws UnsupportedEncodingException {
|
public JwtResponse parser(@RequestParam String jwt) throws UnsupportedEncodingException {
|
||||||
|
|
||||||
Jws<Claims> claims = Jwts.parser()
|
Jws<Claims> jws = Jwts.parser()
|
||||||
.setSigningKeyResolver(secretService.getSigningKeyResolver())
|
.setSigningKeyResolver(secretService.getSigningKeyResolver())
|
||||||
.parseClaimsJws(jwt);
|
.parseClaimsJws(jwt);
|
||||||
|
|
||||||
return new JwtResponse(claims);
|
return new JwtResponse(jws);
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping(value = "/parser-enforce", method = GET)
|
@RequestMapping(value = "/parser-enforce", method = GET)
|
||||||
public JwtResponse parserEnforce(@RequestParam String jwt) throws UnsupportedEncodingException {
|
public JwtResponse parserEnforce(@RequestParam String jwt) throws UnsupportedEncodingException {
|
||||||
Jws<Claims> claims = Jwts.parser()
|
Jws<Claims> jws = Jwts.parser()
|
||||||
.requireIssuer("Stormpath")
|
.requireIssuer("Stormpath")
|
||||||
.require("hasMotorcycle", true)
|
.require("hasMotorcycle", true)
|
||||||
.setSigningKeyResolver(secretService.getSigningKeyResolver())
|
.setSigningKeyResolver(secretService.getSigningKeyResolver())
|
||||||
.parseClaimsJws(jwt);
|
.parseClaimsJws(jwt);
|
||||||
|
|
||||||
return new JwtResponse(claims);
|
return new JwtResponse(jws);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue