public async Task <IActionResult> Get()
        {
            IdentityAdto identityAdto = await _identityApplicationService.GetAsync(new GetIdentityAdto
            {
                Id = _currentIdentityProvider.Id
            });

            switch (identityAdto)
            {
            case PasswordIdentityAdto passwordIdentityAdto:
                return(Ok(_resourceBuilder.Build(new PasswordIdentityResource
                {
                    Id = passwordIdentityAdto.Id
                })));

            case IdentityAdto defaultIdentityAdto:
                return(Ok(_resourceBuilder.Build(new IdentityResource
                {
                    Id = defaultIdentityAdto.Id
                })));

            default:
                throw new ArgumentOutOfRangeException(nameof(identityAdto));
            }
        }
        public async Task <IActionResult> ChangePasswordResourceTemplate()
        {
            IdentityAdto identityAdto = await _identityApplicationService.GetAsync(new GetIdentityAdto
            {
                Id = _currentIdentityProvider.Id
            });

            return(Ok(_resourceBuilder.Build(new ChangePasswordIdentityTemplate
            {
                Version = identityAdto.Version
            })));
        }