@SuppressWarnings("unchecked") public <T> T readContent(Class<T> type) { MediaType mediaType = MediaType.WILDCARD_TYPE; if (header.getContentType() != null) { mediaType = MediaType.valueOf(header.getContentType()); } return (T) readContent(type, null, null, mediaType); }
public static boolean verify(JWSInput input, byte[] sharedSecret) { try { byte[] signature = sign(input.getContent(), input.getHeader().getAlgorithm(), sharedSecret); String x = Base64Url.encode(signature); return x.equals(input.getEncodedSignature()); } catch (Exception e) { throw new RuntimeException(e); } }
public static boolean verify(JWSInput input, PublicKey publicKey) { try { Signature verifier = getSignature(input.getHeader().getAlgorithm()); verifier.initVerify(publicKey); verifier.update(input.getContent()); return verifier.verify(input.getSignature()); } catch (Exception e) { throw new RuntimeException(e); } }
JWSInput input = new JWSInput(code, providers); boolean verifiedCode = false; try return Response.status(Response.Status.BAD_REQUEST).type(MediaType.APPLICATION_JSON_TYPE).entity(res).build(); String key = input.readContent(String.class); AccessCode accessCode = null; synchronized (accessCodeMap)
String realm = metadata.getRealm(); String resource = metadata.getResourceName(); JWSInput input = new JWSInput(tokenString); boolean verified = false; try try token = JsonSerialization.fromBytes(SkeletonKeyToken.class, input.getContent());
JWSInput input = new JWSInput(code, providers); boolean verifiedCode = false; try return; String key = input.readContent(String.class); AccessCode accessCode = accessCodeMap.remove(key); String redirect = request.getParameter("redirect_uri");
public static boolean verify(JWSInput input, SecretKey key) { try { byte[] signature = sign(input.getContent(), input.getHeader().getAlgorithm(), key); String x = Base64Url.encode(signature); return x.equals(input.getEncodedSignature()); } catch (Exception e) { throw new RuntimeException(e); } }
public static boolean verify(JWSInput input, PublicKey publicKey) { try { Signature verifier = getSignature(input.getHeader().getAlgorithm()); verifier.initVerify(publicKey); verifier.update(input.getContent()); return verifier.verify(input.getSignature()); } catch (Exception e) { throw new RuntimeException(e); } }
@SuppressWarnings("unchecked") public <T> T readContent(Class<T> type) { MediaType mediaType = MediaType.WILDCARD_TYPE; if (header.getContentType() != null) { mediaType = MediaType.valueOf(header.getContentType()); } return (T) readContent(type, null, null, mediaType); }
public static boolean verify(JWSInput input, SecretKey key) { try { byte[] signature = sign(input.getContent(), input.getHeader().getAlgorithm(), key); String x = Base64Url.encode(signature); return x.equals(input.getEncodedSignature()); } catch (Exception e) { throw new RuntimeException(e); } }
public static boolean verify(JWSInput input, byte[] sharedSecret) { try { byte[] signature = sign(input.getContent(), input.getHeader().getAlgorithm(), sharedSecret); String x = Base64Url.encode(signature); return x.equals(input.getEncodedSignature()); } catch (Exception e) { throw new RuntimeException(e); } }