// Revoke revokes the access token a given session state.
// https://developer.okta.com/docs/api/resources/oidc#revoke
Revoke revokes the access token a given session state.
// Revoke revokes the access token a given session state . // https : // developer . okta . com / docs / api / resources / oidc#revoke
func (p *OktaProvider) Revoke(token string) error {
	params := url.Values{}
	params.Add("client_id", p.ClientID)
	params.Add("client_secret", p.ClientSecret)
	params.Add("token", token)
	params.Add("token_type_hint", "refresh_token")
	err := httputil.Client(http.MethodPost, p.RevokeURL.String(), version.UserAgent(), nil, params, nil)
	if err != nil && err != httputil.ErrTokenRevoked {
		return err
	}
	return nil
}
func ( p * OktaProvider ) Revoke ( token string ) error { params := url . Values { } params . Add ( " " , p . ClientID ) params . Add ( " " , p . ClientSecret ) params . Add ( " " , token ) params . Add ( " " , " " ) err := httputil . Client ( http . MethodPost , p . RevokeURL . String ( ) , version . UserAgent ( ) , nil , params , nil ) if err != nil && err != httputil . ErrTokenRevoked { return err } return nil }
Revoke revokes the access token a given session state.
Revoke revokes the access token a given session state .