add func for creating JWT token

This commit is contained in:
adlerhurst 2020-09-07 12:39:22 +02:00
parent 7a109a763d
commit 7487af3db4
2 changed files with 23 additions and 2 deletions

View file

@ -129,9 +129,16 @@ func JWTExchange(w http.ResponseWriter, r *http.Request, exchanger VerifyExchang
RequestError(w, r, err)
}
claims, err := exchanger.Verifier().Verify(r.Context(), "", assertion)
fmt.Println(claims, err)
_ = assertion
fmt.Println(claims, err)
var authReq AuthRequest
var client Client
resp, err := CreateJWTTokenResponse(r.Context(), authReq, client, exchanger)
if err != nil {
RequestError(w, r, err)
return
}
utils.MarshalJSON(w, resp)
}
func ParseJWTTokenRequest(r *http.Request, decoder *schema.Decoder) (string, error) {