protected void RejectWithError(string szError) { EndUserAuthorizationFailedResponse resp = authorizationServer.PrepareRejectAuthorizationRequest(m_pendingRequest); resp.Error = szError; OutgoingWebResponse wr = authorizationServer.Channel.PrepareResponse(resp); wr.Send(); }
public EndUserAuthorizationFailedResponse PrepareRejectAuthorizationRequest(EndUserAuthorizationRequest authorizationRequest, Uri callback = null) { if (callback == null) { callback = this.GetCallback(authorizationRequest); } var response = new EndUserAuthorizationFailedResponse(callback, authorizationRequest); return(response); }
/// <summary> /// Prepares a response to inform the Client that the user has rejected the Client's authorization request. /// </summary> /// <param name="authorizationRequest">The authorization request.</param> /// <param name="callback">The Client callback URL to use when formulating the redirect to send the user agent back to the Client.</param> /// <returns>The authorization response message to send to the Client.</returns> public EndUserAuthorizationFailedResponse PrepareRejectAuthorizationRequest(EndUserAuthorizationRequest authorizationRequest, Uri callback = null) { Contract.Ensures(Contract.Result <EndUserAuthorizationFailedResponse>() != null); if (callback == null) { callback = this.GetCallback(authorizationRequest); } var response = new EndUserAuthorizationFailedResponse(callback, authorizationRequest); return(response); }