Merge branch 'zitadel:main' into rp/UnauthorizedHandler
This commit is contained in:
commit
763e05feed
4 changed files with 51 additions and 3 deletions
5
pkg/client/rp/errors.go
Normal file
5
pkg/client/rp/errors.go
Normal file
|
@ -0,0 +1,5 @@
|
|||
package rp
|
||||
|
||||
import "errors"
|
||||
|
||||
var ErrRelyingPartyNotSupportRevokeCaller = errors.New("RelyingParty does not support RevokeCaller")
|
|
@ -4,7 +4,6 @@ import (
|
|||
"context"
|
||||
"encoding/base64"
|
||||
"errors"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"time"
|
||||
|
@ -748,7 +747,7 @@ func RevokeToken(ctx context.Context, rp RelyingParty, token string, tokenTypeHi
|
|||
if rc, ok := rp.(client.RevokeCaller); ok && rc.GetRevokeEndpoint() != "" {
|
||||
return client.CallRevokeEndpoint(ctx, request, nil, rc)
|
||||
}
|
||||
return fmt.Errorf("RelyingParty does not support RevokeCaller")
|
||||
return ErrRelyingPartyNotSupportRevokeCaller
|
||||
}
|
||||
|
||||
func unauthorizedError(w http.ResponseWriter, r *http.Request, desc string, state string, rp RelyingParty) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue