public async Task <IActionResult> RegisterPassword(RegisterPasswordIdentityTemplate template)
        {
            PasswordAdto passwordAdto = await _identityApplicationService.RegisterPasswordAsync(new RegisterPasswordAdto
            {
                Identifier      = template.Identifier,
                Password        = template.Password,
                ConfirmPassword = template.ConfirmPassword,
                EmailAddress    = template.EmailAddress
            });

            return(Accepted(_resourceBuilder.Build(new RegisterPasswordResource
            {
                Id = passwordAdto.IdentityId
            })));
        }
 public Task <PasswordAdto> RegisterPasswordAsync(RegisterPasswordAdto registerPasswordAdto)
 {
     return(_securityApplicationService.SecureAsync(() => _identityApplicationService.RegisterPasswordAsync(registerPasswordAdto),
                                                    DefaultAuthorisationContext.Create(AuthorisationResource.Identity, AuthorisationAction.Create)));
 }