As the final part of setting up Blazor it is necessary to change the encryption keys, authentication settings and connection settings in the appsettings.json files. Before we can change the keys required in these files, we need to generate the keys with the Setup tool. Learn how to generate these keys on the Generating Keys page. The generated keys should be copied to replace the default keys in the appsettings.json file. Please generate and use a unique key for each such setting.
| Regarding "AmtCookieEncryptionKey" |
|---|
It is necessary for the "AmtCookieEncryptionKey" key to
be the same as the other cookie encryption keys in your AMT environment, also found in the Application
Center appsettings.json file. |
{
"Amt": {
...
"RuntimeBehaviour": "Cobol",
...
}, ...
"BlazorWebAPI": {
"Protocol": "Http",
"Domain": "localhost/AMT/APPLICATION_WebAPI",
"Port": 0
},preferred_username is used as claim type.
...
"AmtOIDC": {
"OIDC": {
"ClientId": "amt-blazor-webclient-server",
"Authority": "https://login.example.org/amt-applications/v2/auth",
"Scope": "openid profile amt-blazor-webapi-scope",
"ClientSecret": "c8A6L7j5E3N0n9Y",
"TokenValidationParameters": {
"NameClaimType": "preferred_username"
}
}, ...
"AmtOIDC": {
...
"CookieAuthenticationOptions": {
"Name": ".Amt.Blazor.ApplicationName.Auth",
...
"SameSite": "None"
}
},The Blazor WebAPI handles communication between the Blazor client and the Transaction Server. Follow the steps below to begin configuring the WebAPI.
{
"Amt": {
"AmtCookieEncryptionKey": "YGQ9zlT4noYK3O3+SnsbuNyalJMhGpXvZ3Zr82xgE8I=",
"ApplicationName": "BlazorWebAPI",preferred_username is used as claim type. "Amt": {
...
"Authentication": {
"AuthenticationType": "JWT",
"JWT": {
"Authority": "https://login.example.org/amt-applications/v2/auth",
"Audience": "amt-blazor-webapi",
"TokenValidationParameters": {
"NameClaimType": "preferred_username"
}
} "BlazorAPI": {
"ConnectionType": "TransactionServer",
"ConnectionAddress": "GRPC:NB1435:40102",
...
},
...
}| Regarding "ConnectionType" |
|---|
| A LION application without a manager is of the type AppServer. Otherwise it is of the type
AppManager. The type TransactionServer is used for AMT-COBOL configurations and the type VsWebApi for VisualStudio environments. |
It is required to restart the relevant application pool after configuration of the appsettings.json files is complete for all Blazor web applications to function properly. Select the application pool that needs to be restarted and select the Recycle... button. Alternatively, restart the entire IIS server.


The final step is adding the web application to the Control Center.