File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
src/main/java/com/danubetech/keyformats/jose Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 11package com .danubetech .keyformats .jose ;
22
3+ import com .fasterxml .jackson .core .JsonProcessingException ;
34import com .fasterxml .jackson .databind .ObjectMapper ;
45import org .apache .commons .codec .binary .Base64 ;
56
7+ import java .io .IOException ;
8+ import java .io .StringReader ;
69import java .util .Map ;
710
811public class JWK {
@@ -23,6 +26,14 @@ public static JWK parse(Map<String, Object> json) {
2326 return objectMapper .convertValue (json , JWK .class );
2427 }
2528
29+ public static JWK parse (String string ) throws IOException {
30+ return objectMapper .readValue (new StringReader (string ), JWK .class );
31+ }
32+
33+ public String toJSONString () throws JsonProcessingException {
34+ return objectMapper .writeValueAsString (this );
35+ }
36+
2637 public String getKid () {
2738 return kid ;
2839 }
You can’t perform that action at this time.
0 commit comments