feat: add rp.RevokeToken (#231)
* feat: add rp.RevokeToken * add missing lines after conflict resolving Co-authored-by: Livio Spring <livio.a@gmail.com>
This commit is contained in:
parent
0847a5985a
commit
39852f6021
6 changed files with 88 additions and 5 deletions
|
@ -113,8 +113,11 @@ func ParseTokenRevocationRequest(r *http.Request, revoker Revoker) (token, token
|
|||
func RevocationRequestError(w http.ResponseWriter, r *http.Request, err error) {
|
||||
e := oidc.DefaultToServerError(err, err.Error())
|
||||
status := http.StatusBadRequest
|
||||
if e.ErrorType == oidc.InvalidClient {
|
||||
switch e.ErrorType {
|
||||
case oidc.InvalidClient:
|
||||
status = 401
|
||||
case oidc.ServerError:
|
||||
status = 500
|
||||
}
|
||||
httphelper.MarshalJSONWithStatus(w, e, status)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue