Skip to content

Commit 5d3f964

Browse files
authored
Merge pull request #1238 from ITfoxtec/1.20.x-development
1.20.x development
2 parents b0367da + 2fd2449 commit 5d3f964

29 files changed

+292
-113
lines changed

FoxIDs.sln

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{CB5D86A0-D
7373
docs\description.md = docs\description.md
7474
docs\development.md = docs\development.md
7575
docs\email.md = docs\email.md
76+
docs\extended-ui.md = docs\extended-ui.md
7677
docs\external-login.md = docs\external-login.md
7778
docs\faq.md = docs\faq.md
7879
docs\foxids-dev.md = docs\foxids-dev.md
@@ -129,6 +130,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "images", "images", "{CB8812
129130
docs\images\configure-env-name-address.png = docs\images\configure-env-name-address.png
130131
docs\images\configure-environment-setting.png = docs\images\configure-environment-setting.png
131132
docs\images\configure-environment.png = docs\images\configure-environment.png
133+
docs\images\configure-extended-ui-api.png = docs\images\configure-extended-ui-api.png
134+
docs\images\configure-extended-ui-ssn.png = docs\images\configure-extended-ui-ssn.png
135+
docs\images\configure-extended-ui-text.png = docs\images\configure-extended-ui-text.png
132136
docs\images\configure-external-claims-config.png = docs\images\configure-external-claims-config.png
133137
docs\images\configure-external-login-config.png = docs\images\configure-external-login-config.png
134138
docs\images\configure-external-login-ui.png = docs\images\configure-external-login-ui.png
@@ -191,6 +195,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "images", "images", "{CB8812
191195
docs\images\environments.vsdx = docs\images\environments.vsdx
192196
docs\images\example-claim-transform-name-to-given_name-family_name.png = docs\images\example-claim-transform-name-to-given_name-family_name.png
193197
docs\images\example-claim-transform-remove-post-auth-method-name.png = docs\images\example-claim-transform-remove-post-auth-method-name.png
198+
docs\images\extended-ui-sample1-dk.png = docs\images\extended-ui-sample1-dk.png
199+
docs\images\extended-ui-sample1-en.png = docs\images\extended-ui-sample1-en.png
194200
docs\images\faq-pass-through-all-claims-app-reg.png = docs\images\faq-pass-through-all-claims-app-reg.png
195201
docs\images\faq-pass-through-all-claims-auth-method.png = docs\images\faq-pass-through-all-claims-auth-method.png
196202
docs\images\fqa-matching-issuer-authority.png = docs\images\fqa-matching-issuer-authority.png
@@ -295,6 +301,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "images", "images", "{CB8812
295301
docs\images\token-exchange-saml-by-trust-auth-method.png = docs\images\token-exchange-saml-by-trust-auth-method.png
296302
docs\images\token-exchange-saml-by-trust.svg = docs\images\token-exchange-saml-by-trust.svg
297303
docs\images\token-exchange.vsdx = docs\images\token-exchange.vsdx
304+
docs\images\user-auth-otp-email.png = docs\images\user-auth-otp-email.png
305+
docs\images\user-auth-password.png = docs\images\user-auth-password.png
298306
docs\images\user-create-new-account-config.png = docs\images\user-create-new-account-config.png
299307
docs\images\user-create-new-account.png = docs\images\user-create-new-account.png
300308
docs\images\user-email-phone-username-user-identifier.png = docs\images\user-email-phone-username-user-identifier.png

docs/_sidebar.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
- [Applications](howto-connect.md#how-to-connect-applications)
66
- [Development](development.md)
77
- [.NET Samples](samples.md)
8+
- [FoxIDs dev in VS](foxids-dev.md)
89
- [SAML / OpenID Connect bridge](bridge.md)
910
- [Connections](connections.md)
1011
- [Login & HRD & MFA](login.md)
@@ -24,15 +25,15 @@
2425
- [Windows with IIS](deployment-window-iis.md)
2526
- [Azure Container](deployment-azure.md)
2627
- Topics
28+
- [FoxIDs inside](foxids-inside.md)
2729
- [Users](users.md)
2830
- [Claims](claim.md)
2931
- [Claim transforms and tasks](claim-transform-task.md)
32+
- [Extended UI](extended-ui.md)
3033
- [Certificates](certificates.md)
3134
- [Logging](logging.md)
3235
- [Email provider](email.md)
33-
- [Supported standards](standard-support.md)
34-
- [FoxIDs inside](foxids-inside.md)
3536
- [Control Client & API](control#.md)
37+
- [Supported standards](standard-support.md)
3638
- [Plans](plan.md)
37-
- [FoxIDs dev in VS](foxids-dev.md)
3839
- [FAQ](faq.md)

docs/claim-transform-task.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ Use case sceneries
9696
You need to implement a simple API that FoxIDs calls when the claim transformation is executed.
9797
Please have a look at the [sample code](#api-sample).
9898

99-
The API has a base URL and the functionality is divided into folders. Currently, only the `claims` folder (functionality) for requesting a list of claims is support.
99+
The API has a base URL, and the functionality is divided into folders. Currently, only the `claims` folder (functionality) for requesting a list of claims is support.
100100

101101
If the base URL for the API is `https://somewhere.org/myclaimsstore` the URL for the `claims` folder will be `https://somewhere.org/myclaimsstore/claims`.
102102

@@ -165,14 +165,14 @@ The API must return HTTP code 401 (Unauthorized) and an `error` (required) if th
165165
```
166166

167167
If other errors occur, the API should return HTTP code 500 or another appropriate error code.
168-
It is recommended to add a technical error message in to the return body. The error message can then later be found in the FoxIDs logs.
168+
It is recommended to add a technical error message in `ErrorMessage`. The error message can then later be found in the FoxIDs logs.
169169

170-
> Error messages returned from the API is NOT displayed for the user only logged.
170+
> Error messages returned from the API in `ErrorMessage` is NOT displayed for the user only logged.
171171
172172
### API Sample
173-
The sample [ExternalClaimsApiSample](https://github.com/ITfoxtec/FoxIDs.Samples/tree/main/src/ExternalClaimsApiSample) show how to implement the API in ASP.NET Core 8.
173+
The sample [ExternalClaimsApiSample](https://github.com/ITfoxtec/FoxIDs.Samples/tree/main/src/ExternalClaimsApiSample) show how to implement the API in ASP.NET Core.
174174

175-
You can user this [Postman collection](https://github.com/ITfoxtec/FoxIDs.Samples/tree/main/src/ExternalClaimsApiSample/external-claims-api.postman_collection.json) to call and test the sample with [Postman](https://www.postman.com/downloads/).
175+
You can user this [Postman collection](https://github.com/ITfoxtec/FoxIDs.Samples/tree/main/src/ExternalClaimsApiSample/external-claims-api.postman_collection.json) to call and test your API with [Postman](https://www.postman.com/downloads/).
176176

177177
### Configure
178178
Configure to call your API in a claims transformation in [FoxIDs Control Client](control.md#foxids-control-client).

docs/extended-ui.md

Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
# Extended UI
2+
3+
You can extend the login user interface (UI) flow with custom login pages build with dynamic elements. The extended UIs have full support for culture / multi language.
4+
It is possible to create multiple custom UIs with different dynamic elements.
5+
Each extended UI page can optionally [call an API](#implement-api). If an API is called the returned claims is added to the claims collection otherwise the input values is added as the output claim type defined on the dynamic elements.
6+
7+
The dynamic elements consist of fixed fields a customisable field and both text and HTML content elements. With this you can easily ask for the user's name, one or more self defined fields and show a logo and a link on a extended UI page.
8+
9+
> Extended UIs can be added to the following authentication methods in the **Extended UI** tab; login, external login, OpenID Connect, SAML 2.0 and environment link.
10+
11+
**Select extended UI page**
12+
You select an extended UI page in the login flow by adding the claim type `open_extended_ui` with the extended UI page name in the first-level claim transforms.
13+
In a SAML 2.0 authentication method optionally select with the corresponding SAML 2.0 claim `http://schemas.foxids.com/ws/identity/claims/openextendedui` in the first-level claim transforms.
14+
Subsequently extended UI pages can be selected in the extended UI claim transforms by adding the claim type `open_extended_ui` (JWT claim only) with the next extended UI page name.
15+
16+
**Example**
17+
This example page asks the user to enter their social security number (shown in two languages).
18+
The example extended UI adds the input value to the claims collection as the claim type `social_security_number`. In a real-world scenario, you would probably call an API to validate the social security number.
19+
In English:
20+
![Extended UI with Social security number in English](images/extended-ui-sample1-en.png)
21+
22+
In Danish:
23+
![Extended UI with Social security number in Danish](images/extended-ui-sample1-dk.png)
24+
25+
The example page is configured in a SAML 2.0 authentication method with three elements.
26+
27+
![Configure Extended UI with Social security number input field](images/configure-extended-ui-ssn.png)
28+
29+
> The extended UI can be customised with CSS in the login authentication method called **Default login**, unless you create another login method and use that instead. There's quite a lot of flexibility in how the dialogs can be designed.
30+
31+
## Translations
32+
The texts (and error messages) used in dynamic elements is automatically translated if they are defined as global text with translations. Otherwise, there is automatically created a text element in the environments on winch you can add translations.
33+
If you want to support multi languages, you should create the texts as English texts and add translations for the texts.
34+
35+
You find the texts and translations in the **Settings** tab and then the **Texts** tab.
36+
![Configure Extended UI with Social security number input field](images/configure-extended-ui-text.png)
37+
38+
## Implement API
39+
40+
Each extended UI page can [call an API](#implement-api) with the result from the dynamic elements and selected claims. The API can then validate the user input and either on success return claims or an error message to the user.
41+
42+
You need to implement a simple API that FoxIDs calls on every page request.
43+
Please have a look at the [sample code](#api-sample).
44+
45+
The API has a base URL, and the functionality is divided into folders. Currently, only the `validate` folder (functionality) for validating the dynamic elements and selected claims is support.
46+
*Other folders may be added later.*
47+
48+
If the base URL for the API is `https://somewhere.org/mystore` the URL for the `validate` folder will be `https://somewhere.org/mystore/validate`.
49+
50+
> FoxIDs Cloud calls your API from the IP address `57.128.60.142`.
51+
*The outgoing IP address can be changed and more can be added over time.*
52+
53+
### Request
54+
The API call is secured with [HTTP Basic authentication scheme](https://datatracker.ietf.org/doc/html/rfc6749#section-2.3.1) where FoxIDs sends the ID `external_extended_ui` as the username and the configured secret as the password.
55+
56+
The API is called with HTTP POST and a JSON body.
57+
58+
This is a request JSON body with two dynamic elements and two claims:
59+
```JSON
60+
{
61+
"elements": [
62+
{
63+
"Name": "ne5uqp5z",
64+
"Type": "Email",
65+
"ClaimType": "email",
66+
"Value": "[email protected]"
67+
},
68+
{
69+
"Name": "ktvywqwc",
70+
"Type": "Custom",
71+
"ClaimType": "my_claim",
72+
"Value": "123456"
73+
}
74+
],
75+
"claims": [
76+
{
77+
"type": "sub",
78+
"value": "1b1ac05e-5937-4939-a49c-0e84a89662df"
79+
},
80+
{
81+
"type": "email",
82+
"value": "[email protected]"
83+
}
84+
]
85+
}
86+
```
87+
88+
### Response
89+
**Success**
90+
On success the API should return HTTP code 200 and a list of `claims` (the list can be empty).
91+
92+
For example, the valid input values as claims:
93+
```JSON
94+
{
95+
"claims": [
96+
{
97+
"type": "email",
98+
"value": "[email protected]"
99+
},
100+
{
101+
"type": "my_claim",
102+
"value": "123456"
103+
}
104+
]
105+
}
106+
```
107+
108+
**Error**
109+
The API must return HTTP code 401 (Unauthorized) and an `error` (required) if the Basic authentication is rejected. Optionally add an error description in `ErrorMessage`.
110+
```JSON
111+
{
112+
"error": "invalid_api_id_secret",
113+
"ErrorMessage": "Invalid API ID or secret"
114+
}
115+
```
116+
117+
118+
The API can return HTTP code 400 (401 and 403 is also supported), and an `error` (required) if the input is rejected. Optionally add an error message to the user in `UiErrorMessage` and an error description in `ErrorMessage`.
119+
The `UiErrorMessage` is translated as a text and should be in English if you want to support multi languages.
120+
121+
A general validation error:
122+
```JSON
123+
{
124+
"error": "invalid",
125+
"ErrorMessage": "Something is not accepted.",
126+
"UiErrorMessage": "Please change the thing that is wrong."
127+
}
128+
```
129+
130+
A validation error connected to a dynamic element by the elements name:
131+
```JSON
132+
{
133+
"error": "invalid",
134+
"elements": [
135+
{
136+
"Name": "ktvywqwc",
137+
"ErrorMessage": "The element is not valid because of something.",
138+
"UiErrorMessage": "Please change the value to the correct value."
139+
}
140+
]
141+
}
142+
```
143+
144+
If other errors occur, the API should return HTTP code 500 or another appropriate error code.
145+
It is recommended to add a technical error message in `ErrorMessage`. The error message can then later be found in the FoxIDs logs.
146+
147+
> Error messages returned from the API in `ErrorMessage` is NOT displayed for the user only logged.
148+
149+
## API Sample
150+
The sample [ExternalExtendedUiApiSample](https://github.com/ITfoxtec/FoxIDs.Samples/tree/main/src/ExternalExtendedUiApiSample) show how to implement the API in ASP.NET Core.
151+
152+
You can user this [Postman collection](https://github.com/ITfoxtec/FoxIDs.Samples/tree/main/src/ExternalExtendedUiApiSample/external-extended-ui-api.postman_collection.json) to call and test your API with [Postman](https://www.postman.com/downloads/).
153+
154+
## Configure
155+
Configure an extended UI page in a authentication method to call your API in [FoxIDs Control Client](control.md#foxids-control-client).
156+
157+
Navigate the **Authentication** tab and select the authentication method, then select the **Extended UI** tab. Find the extended UI page and configure the API.
158+
159+
![Configure extended UI API](images/configure-extended-ui-api.png)
160+
161+
- Optionally select claims that should be send to the API.
162+
- Add the base API URL without the `validate` folder in **API URL**
163+
- Add the **API secret**
164+
- Add a generic error message which is displayed for the user if the API returns an error without a `UiErrorMessage`

docs/external-login.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ The external login UI can be [customised](customisation.md).
2525
You need to implement a simple API that FoxIDs calls on every authentication request.
2626
Please have a look at the [sample code](#api-sample).
2727

28-
The API has a base URL and the functionality is divided into folders. Currently, only the `authentication` folder (functionality) for validating the username and password is support.
28+
The API has a base URL, and the functionality is divided into folders. Currently, only the `authentication` folder (functionality) for validating the username and password is support.
2929
*Other folders for changing passwords and creating new users will be added later.*
3030

3131
If the base URL for the API is `https://somewhere.org/mystore` the URL for the `authentication` folder will be `https://somewhere.org/mystore/authentication`.
@@ -112,14 +112,14 @@ The API must return HTTP code 400, 401 or 403 and an `error` (required) if the u
112112
```
113113

114114
If other errors occur, the API should return HTTP code 500 or another appropriate error code.
115-
It is recommended to add a technical error message in to the return body. The error message can then later be found in the FoxIDs logs.
115+
It is recommended to add a technical error message in `ErrorMessage`. The error message can then later be found in the FoxIDs logs.
116116

117-
> Error messages returned from the API is NOT displayed for the user only logged.
117+
> Error messages returned from the API in `ErrorMessage` is NOT displayed for the user only logged.
118118
119119
## API Sample
120-
The sample [ExternalLoginApiSample](https://github.com/ITfoxtec/FoxIDs.Samples/tree/main/src/ExternalLoginApiSample) show how to implement the API in ASP.NET Core 8.
120+
The sample [ExternalLoginApiSample](https://github.com/ITfoxtec/FoxIDs.Samples/tree/main/src/ExternalLoginApiSample) show how to implement the API in ASP.NET Core.
121121

122-
You can user this [Postman collection](https://github.com/ITfoxtec/FoxIDs.Samples/tree/main/src/ExternalLoginApiSample/external-login-api.postman_collection.json) to call and test the sample with [Postman](https://www.postman.com/downloads/).
122+
You can user this [Postman collection](https://github.com/ITfoxtec/FoxIDs.Samples/tree/main/src/ExternalLoginApiSample/external-login-api.postman_collection.json) to call and test your API with [Postman](https://www.postman.com/downloads/).
123123

124124
## Configure
125125
Configure an external login authentication method to call your API in [FoxIDs Control Client](control.md#foxids-control-client).
43.9 KB
Loading
111 KB
Loading
96.8 KB
Loading
28.8 KB
Loading
31 KB
Loading

0 commit comments

Comments
 (0)