indice-co / indice.platform Goto Github PK
View Code? Open in Web Editor NEWIndice Platform addons and featues
License: MIT License
Indice Platform addons and featues
License: MIT License
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:
/**
* 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>();
CaseApiOptions
are not configuring properly the api endpoints or api group names for admin
and my
endpoints.
will need migration script
When consuming from nuget the clients sentsphone
scope even if we do not declare it from the SpaOptions
.
This is not a valid scope for cases-api resource.
AdminUIAdministrator, AdminUIUserReader, AdminUIUserWriter, AdminUIClientReader, AdminUIClientWriter are the role names to use.
In the Admin UI application, on the user Details page, when changing the Password Expires option to "In next login" we get a 500 error.
IFileService
implementation at Indice Messages featureThe "update phone number" api endpoint has a regex hardcoded. This must be configured from the Consumer
We need to keep in mind all the corresponding phone-update actions (eg from AdminUI or IdentityMvc)
Replace current appsettings configuration with a configuration section. At first, a user having access to this section will be able to manage:
000123
https://blog.crunchydata.com/blog/message-queuing-using-native-postgresql
SqlServerMessageQueue.cs
Currenty we are passsing separately the list options we need.
we need to change it and use ListOptions.
this is breaking change for existing api consumers
Remember to probably add it on extended user store.
Create new gauge diagrams on dashboard page:
@giorgos07
Keep this issue open until its fixed and published by Azure team.
After that we will remove the workaround code and close the issue
Azure/azure-sdk-for-net#22877
After testing the following have been found and need to be fixed/researched so that the cases management system can run using PostgreSQL engine.
json
columns uses MsSql fucntions by default. This needs to be configurable.AddWorkflow
extension method allows for a delegate to configure the Elsa efcore dbcontext giving the ability to use other engines for Elsa as well.Other checks that need to be made
Certification.LoanPayoffBalance:Rejected
αλλά θέλουμε να χρησιμοποιούμε μόνο το Rejected
.Rejected
sub, email, email_verified, phone_number, phone_number_verified, name are the claims to filter
ExtendedUserStore and PasswordHistoryValidator
Maybe You will be interested in hosting API Explorer online:
https://www.robiniadocs.com/d/indice-aspnet/api/Indice.AspNet.HtmlHelpers.GridHelper.html
Create public register endpoint - if system client allow all claims (same applies on update claim endpoint) - add setting to respond with not found if disabled
While trying to use smsService and emailService sequentially in an event handler we are getting the following error: System.ObjectDisposedException: 'Cannot access a disposed object.'
The weird thing about this behavior is that if emailService related code precedes smsService, the exception won't be thrown!
Code Snippet:
using System;
using System.Threading.Tasks;
using Indice.AspNetCore.Identity;
using Indice.AspNetCore.Identity.Api.Events;
using Indice.Services;
using Microsoft.Extensions.Localization;
using Microsoft.Extensions.Logging;
namespace ChaniaBank.Identity.Events
{
public class PasswordChangedEventHandler : IIdentityServerApiEventHandler<PasswordChangedEvent>
{
private readonly ILogger<PasswordChangedEventHandler> _logger;
private readonly ISmsService _smsService;
private readonly IEmailService _emailService;
private readonly IStringLocalizer<PasswordChangedEventHandler> _localizer;
/// <summary>
/// Creates a new instance of <see cref="PasswordChangedEventHandler"/>.
/// </summary>
public PasswordChangedEventHandler(
ILogger<PasswordChangedEventHandler> logger,
ISmsService smsService,
IEmailService emailService,
IStringLocalizer<PasswordChangedEventHandler> localizer
) {
_logger = logger ?? throw new ArgumentNullException(nameof(logger));
_smsService = smsService ?? throw new ArgumentNullException(nameof(smsService));
_emailService = emailService ?? throw new ArgumentNullException(nameof(emailService));
_localizer = localizer ?? throw new ArgumentNullException(nameof(localizer));
}
/// <summary>
/// Handle password changed event.
/// </summary>
/// <param name="event">Password changed event info.</param>
public async Task Handle(PasswordChangedEvent @event) {
_logger.LogDebug($"Password changed: {@event}");
if (@event.User.PhoneNumberConfirmed) {
await _smsService.SendAsync(@event.User.PhoneNumber, _localizer["Password Change"], _localizer["YOUR PASSWORD HAS BEEN CHANGED."] + " " + DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss"));
}
// inform user that his/her password has been changed
if (@event.User.EmailConfirmed) {
var emailBody = GetEmailBody();
await _emailService.SendAsync(message =>
message.To(@event.User.Email)
.WithSubject(_localizer["Password Change"])
.WithBody(emailBody));
}
}
private string GetEmailBody() {
return $@"
<p>{_localizer["Dear customer"]},</p>
<p></p>
{_localizer["YOUR PASSWORD HAS BEEN CHANGED."]} {DateTime.Now:dd/MM/yyyy HH:mm:ss}
<p>{_localizer["The Cooperative Bank of Chania will never ask in any way (via email, phone, SMS or any other way) for you to reveal any personal information such as account details, card numbers and PINs, sign-in details to our eBanking service (username and password)."]}</p>
<p>{_localizer["For more information regarding security, please visit the \"useful advice for online transactions\" section on our Bank's webpage."]}</p>
<p>{_localizer["For any issues or questions regarding the use of our eBanking service feel free to get in touch with any of our representatives by visiting one of our Bank branches (work days between 08:00-14:00) or you can send us your enquiry by e-mail to [email protected] and we’ll get in touch with you as soon as possible."]}</p>
";
}
}
}
When there is no available user (e.g. the user is registering) the /api/account/validate-password endpoint does not take into account the userName from the request payload.
Therefore irrespectively of the MaxAllowedUserNameSubset the password rule always returns valid.
Expected behavior:
When there is no user, the user instance that gets created needs to have the userName initialized from the request value.
Transform controllers to minimal API handlers.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.