You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The http call "PUT /api/clients/{clientId}/urls" from AdminUI receives 405 Method Not Allowed! (Please note, that we are not using the minimal API version of Identity Server)
Code from identity-api.service.ts:
/**
* Renews the list of client urls (redirect cors etc).
* @return No Content
*/
updateClientUrls(clientId: string, body: UpdateClientUrls): Observable<void> {
let url_ = this.baseUrl + "/api/clients/{clientId}/urls";
if (clientId === undefined || clientId === null)
throw new Error("The parameter 'clientId' must be defined.");
url_ = url_.replace("{clientId}", encodeURIComponent("" + clientId));
url_ = url_.replace(/[?&]$/, "");
const content_ = JSON.stringify(body);
let options_ : any = {
body: content_,
observe: "response",
responseType: "blob",
headers: new HttpHeaders({
"Content-Type": "application/json",
})
};
return this.http.request("put", url_, options_).pipe(_observableMergeMap((response_ : any) => {
return this.processUpdateClientUrls(response_);
})).pipe(_observableCatch((response_: any) => {
if (response_ instanceof HttpResponseBase) {
try {
return this.processUpdateClientUrls(response_ as any);
} catch (e) {
return _observableThrow(e) as any as Observable<void>;
}
} else
return _observableThrow(response_) as any as Observable<void>;
}));
}
But, notice that, the aforementioned endpoint only accepts POST http calls (ClientsController.cs in Indice.AspNetCore.Identity):
/// <summary>Renews the list of </summary>
/// <param name="clientId">The id of the client.</param>
/// <param name="request"></param>
/// <response code="204">No Content</response>
/// <response code="404">Not Found</response>
[Authorize(AuthenticationSchemes = IdentityServerApi.AuthenticationScheme, Policy = IdentityServerApi.Policies.BeClientsWriter)]
[CacheResourceFilter(DependentPaths = new string[] { "{clientId}" })]
[Consumes(MediaTypeNames.Application.Json)]
[HttpPost("{clientId}/urls")]
[Produces(MediaTypeNames.Application.Json)]
[ProducesResponseType(statusCode: StatusCodes.Status204NoContent, type: typeof(void))]
[ProducesResponseType(statusCode: StatusCodes.Status404NotFound, type: typeof(ProblemDetails))]
public async Task<IActionResult> UpdateClientUrls([FromRoute] string clientId, [FromBody] UpdateClientUrls request) {
In minimal API, it all seems OK:
group.MapPut("{clientId}/urls", ClientHandlers.UpdateClientUrls)
.WithName(nameof(ClientHandlers.UpdateClientUrls))
.WithSummary("Renews the list of client urls (redirect cors etc).")
.RequireAuthorization(IdentityEndpoints.Policies.BeClientsWriter)
.InvalidateCache(nameof(ClientHandlers.GetClient))
.WithParameterValidation<UpdateClientUrls>();
The text was updated successfully, but these errors were encountered:
Dear Indice Development Team,
The http call "PUT /api/clients/{clientId}/urls" from AdminUI receives 405 Method Not Allowed! (Please note, that we are not using the minimal API version of Identity Server)
Code from identity-api.service.ts:
But, notice that, the aforementioned endpoint only accepts POST http calls (ClientsController.cs in Indice.AspNetCore.Identity):
In minimal API, it all seems OK:
The text was updated successfully, but these errors were encountered: