the granted permissions are stored in the claims and as far as I know there's only 1 way to get the new claims, relogin.
yes you can generate your entities without using the browser. to do this; first run your Suite in the browser, open browser's developer tab and generate an entity. you'll see the XHR request. you can copy this request as a PowerShell command or cURL command
you'll also see that all the metadata of an entity is being post as request payload. if you send the same structure of entity.json, you can generate your CRUD files without using a browser.
In your solution directory, there's a folder called test.
In the test folder, you'll find *.HttpApi.Client.ConsoleTestApp
project.
This project is a sample console application that logins to the backend and makes an authenticated API call.
To be able to run this project, run the following projects
*.HttpApi.Host
*.IdentityServer
Configure your host credentials in the appsettings.json
of this console application:
Run in debug, to make a request for fetching all users. (it's an authenticated request and adds bearer token automatically)
If you want to manually build your own API client you can follow the IDS4 documentation: https://identityserver4.readthedocs.io/en/latest/quickstarts/1_client_credentials.html#creating-the-client
On the other hand, you can also check out the ABP CLI code as an example. It authenticates to the backend and make API calls.
Set the token as Bearer token in your HttpClient
client.SetBearerToken(accessToken);
See https://github.com/abpframework/abp/blob/740fb05644d1097877bbb34446956958e4dc36bd/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Http/CliHttpClient.cs#L48
Also check out https://support.abp.io/QA/Questions/560/How-can-I-call-an-ABP-remote-service-method#answer-19f25faa-e2f5-bc56-3bc7-39f8e32906bf
For you question2:
Inject ISettingProvider
then set the default language for a user with this method _settingProvider.SetForUserAsync()
you can use LocalizationSettingNames.DefaultLanguage
constant for the setting name.
I'll answer 2 & 3 . 2- There's no out of box feature to set a language for a user manually. However you can set a language as default. A user can change his language on his own. See also https://github.com/abpframework/abp/issues/2775 https://github.com/abpframework/abp/issues/2469 (If I find a smooth way of implementing this, I'll write)
3- I guess below code can help you to get all language texts.
public class LanguageAppService : LanguageAppServiceBase, ILanguageAppService
{
protected ISettingManager SettingManager { get; }
protected ILanguageRepository LanguageRepository { get; }
protected AbpLocalizationOptions AbpLocalizationOptions { get; }
public LanguageAppService(
ISettingManager settingManager,
IOptions<AbpLocalizationOptions> abpLocalizationOptions,
ILanguageRepository languageRepository)
{
SettingManager = settingManager;
LanguageRepository = languageRepository;
AbpLocalizationOptions = abpLocalizationOptions.Value;
}
public async Task<PagedResultDto<LanguageDto>> GetListAsync(GetLanguagesTextsInput input)
{
var languages = await LanguageRepository.GetListAsync(input.Sorting,input.MaxResultCount,input.SkipCount,input.Filter);
var totalCount = await LanguageRepository.GetCountAsync(input.Filter);
var defaultLanguage = await FindDefaultLanguage(languages);
var languageDtos = ObjectMapper.Map<List<Language>, List<LanguageDto>>(languages);
if (defaultLanguage != null)
{
var defaultLanguageDto = languageDtos.Find(
l => l.CultureName == defaultLanguage.CultureName &&
l.UiCultureName == defaultLanguage.CultureName
);
if (defaultLanguageDto != null)
{
defaultLanguageDto.IsDefaultLanguage = true;
}
}
return new PagedResultDto<LanguageDto>(totalCount,languageDtos);
}
}
public class GetLanguagesTextsInput : PagedAndSortedResultRequestDto
{
public string Filter { get; set; }
public string ResourceName { get; set; }
public string BaseCultureName { get; set; }
public string TargetCultureName { get; set; }
public bool GetOnlyEmptyValues { get; set; }
}
public class LanguageDto : ExtensibleCreationAuditedEntityDto<Guid>
{
public string CultureName { get; set; }
public string UiCultureName { get; set; }
public string DisplayName { get; set; }
public string FlagIcon { get; set; }
public bool IsEnabled { get; set; }
public bool IsDefaultLanguage { get; set; }
}
if there's a document that you can show this issue (that Azure doesn't accept dots in setting name)
@joe looks like you are having the same issue as reported here => https://support.abp.io/QA/Questions/183/New-Solution-From-ABP-Suite---Errors#answer-c61ff67a-6c21-86b7-99c5-39f5506f9cc7
@jason.smith if you think this is a subject of the Nginx reverse proxy problem, you can keep on discussing it here. If you think it's a separate issue, it'd be better to discuss it in a different thread. If you are worried about your question credits, I already increased your question credits by 1.