add func for creating JWT token
This commit is contained in:
parent
7a109a763d
commit
7487af3db4
2 changed files with 23 additions and 2 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue