Activities of "alper"

you can hide the endpoints easily, see https://support.abp.io/QA/Questions/264/How-to-hide-an-endpoint-from-Swagger

To hide endpoints in Swagger, you can use IDocumentFilter of the Swashbuckle.

class HideOrganizationUnitsFilter : IDocumentFilter
        {
            private const string pathToHide = "/identity/organization-units";

            public void Apply(OpenApiDocument swaggerDoc, DocumentFilterContext context)
            {
                var organizationUnitPaths = swaggerDoc
                    .Paths
                    .Where(pathItem => pathItem.Key.Contains(pathToHide, StringComparison.OrdinalIgnoreCase))
                    .ToList();

                foreach (var item in organizationUnitPaths)
                {
                    swaggerDoc.Paths.Remove(item.Key);
                }
            }
        }

in ConfigureSwaggerServices, add this document filter

        private void ConfigureSwaggerServices(IServiceCollection services)
        {
            services.AddSwaggerGen(
                options =>
                {
                    options.SwaggerDoc("v1", new OpenApiInfo {Title = "MyProjectName API", Version = "v1"});
                    options.DocInclusionPredicate((docName, description) => true);
                    options.CustomSchemaIds(type => type.FullName);
                    options.DocumentFilter<HideOrganizationUnitsFilter>(); //<-------- added this -----------
                }
            );
        }

Forgotten User: The logic and emails for Forgotten User is together in this.accountService.sendPasswordResetCode. If I am using my own emailer I need to replace this with my own endpoint. What do I need to send. In .Net Core Identity I would do something like this but I don't know what to do is this case because I can't see the code.

to replace the existing email sender service; https://support.abp.io/QA/Questions/260/How-to-replace-the-existing-email-sender-with-my-own#answer-cc999500-981c-25df-e932-39f5f3e7f71b

You can create a new class inherits from IEmailSender

public class MyCustomEmailSender : IEmailSender
    {
        public Task SendAsync(string to, string subject, string body, bool isBodyHtml = true)
        {
            throw new System.NotImplementedException();
        }

        public Task SendAsync(string @from, string to, string subject, string body, bool isBodyHtml = true)
        {
            throw new System.NotImplementedException();
        }

        public Task SendAsync(MailMessage mail, bool normalize = true)
        {
            throw new System.NotImplementedException();
        }

        public Task QueueAsync(string to, string subject, string body, bool isBodyHtml = true)
        {
            throw new System.NotImplementedException();
        }
    }
    

alternatively, you can inherit from EmailSenderBase, so you can just override the SendEmailAsync()

    public class MyCustomEmailSender : EmailSenderBase
    {
        public MyCustomEmailSender(IEmailSenderConfiguration configuration, IBackgroundJobManager backgroundJobManager) : base(configuration, backgroundJobManager)
        {
        }

        protected override Task SendEmailAsync(MailMessage mail)
        {
           //send your email
        }
    }

And replace the existing implemantation with yours in your Application project's ApplicationModule. Remove the below code section

#if DEBUG
            context.Services.Replace(ServiceDescriptor.Singleton<IEmailSender, NullEmailSender>());
#endif

and add

context.Services.Replace(ServiceDescriptor.Singleton<IEmailSender, MyCustomEmailSender>());

login / logout actions are not stored in audit logs by design. but I can see this can be requirement. I'm creating an issue for this so that, login logout actions will be stored in Audit Logs. Then you can query it from AbpAuditLogs table and write to your Angular client.

are you returning an Entity to the presentation layer? or is it throwing the ex in MigrateAsync()

I think you are on the wrong way. Add a flag to the tenant "IsClient" and go from that direction. Or you can distinguish clients and other tenants with a Role.

there's no implementation for Angular now, and can add this request to the next release (3.1) but it'll take at least 5 weeks to deliver it (and I cannot promise that it'll be included) not to wait for this, you can start your implementation and ask us the steps you are confused.

hi,

you need to be running your all ABP websites on HTTPS. In the default configuration of IIS, you cannot host a localhost website on IIS (needs some extra procedures).

See https://stackoverflow.com/questions/8169999/how-can-i-create-a-self-signed-cert-for-localhost/48790088#48790088

But for Identity Server, I guess you have to have a valid public domain running on HTTPS. "localhost" is not a reachable domain to be over internet to verify anything

The published apps (when on production server) don’t connect to licensing server to check license. Double check these 2 steps:

  1. Publish your project in RELEASE mode.
  2. Set the environment variable ASPNETCORE_ENVIRONMENT to Production or anything else other than Development.


if you get this error on development time, then probably you haven't logged in with your ABP account. You can login with the following command

abp login <username> -p <password>

if you get this error on development time in Docker container, see this answer

Showing 1621 to 1630 of 1850 entries
Made with ❤️ on ABP v9.0.0-preview Updated on September 20, 2024, 08:30