Skip to content

Commit e8bbd6a

Browse files
Merge pull request #5802 from AfraHussaindeen/master_email-as-username-claim-fix
Update documentation for enabling email as username.
2 parents 2aeaaee + 4c47202 commit e8bbd6a

File tree

4 files changed

+79
-4
lines changed

4 files changed

+79
-4
lines changed

en/identity-server/7.0.0/docs/guides/users/attributes/enable-email-as-username.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,4 +111,22 @@
111111
</tbody>
112112
</table>
113113

114-
7. Restart the server.
114+
7. Update the username claim mapping in the `<IS_HOME>/repository/conf/claim-config.xml` file.
115+
116+
!!! warning "Important"
117+
By default, the claim `http://wso2.org/claims/username` is mapped to the `uid` attribute in the userstore. When enabling email as username, this mapping must be changed to `mail` to ensure the username is correctly stored and retrieved from the userstore.
118+
119+
Without this change, the super admin's username will remain stored under the `uid` attribute instead of `mail`, which can cause issues.
120+
121+
In the `<Dialect dialectURI="http://wso2.org/claims">` dialect, locate the `<Claim>` element with `ClaimURI` as `http://wso2.org/claims/username` and update the `AttributeID` from `uid` to `mail`:
122+
123+
``` xml
124+
<Claim>
125+
<ClaimURI>http://wso2.org/claims/username</ClaimURI>
126+
<DisplayName>Username</DisplayName>
127+
<AttributeID>mail</AttributeID>
128+
<Description>Username</Description>
129+
</Claim>
130+
```
131+
132+
8. Restart the server.

en/identity-server/7.1.0/docs/guides/users/attributes/enable-email-as-username.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,4 +111,23 @@
111111
</tbody>
112112
</table>
113113

114-
7. Restart the server.
114+
7. Update the username claim mapping in the `<IS_HOME>/repository/conf/claim-config.xml` file.
115+
116+
!!! warning "Important"
117+
By default, the claim `http://wso2.org/claims/username` is mapped to the `uid` attribute in the userstore. When enabling email as username, this mapping must be changed to `mail` to ensure the username is correctly stored and retrieved from the userstore.
118+
119+
Without this change, the super admin's username will remain stored under the `uid` attribute instead of `mail`, which can cause issues.
120+
121+
In the `<Dialect dialectURI="http://wso2.org/claims">` dialect, locate the `<Claim>` element with `ClaimURI` as `http://wso2.org/claims/username` and update the `AttributeID` from `uid` to `mail`:
122+
123+
``` xml
124+
<Claim>
125+
<ClaimURI>http://wso2.org/claims/username</ClaimURI>
126+
<DisplayName>Username</DisplayName>
127+
<AttributeID>mail</AttributeID>
128+
<Description>Username</Description>
129+
<SharedProfileValueResolvingMethod>FromOrigin</SharedProfileValueResolvingMethod>
130+
</Claim>
131+
```
132+
133+
8. Restart the server.

en/identity-server/7.2.0/docs/guides/users/attributes/enable-email-as-username.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,4 +111,23 @@
111111
</tbody>
112112
</table>
113113

114-
7. Restart the server.
114+
7. Update the username claim mapping in the `<IS_HOME>/repository/conf/claim-config.xml` file.
115+
116+
!!! warning "Important"
117+
By default, the claim `http://wso2.org/claims/username` is mapped to the `uid` attribute in the userstore. When enabling email as username, this mapping must be changed to `mail` to ensure the username is correctly stored and retrieved from the userstore.
118+
119+
Without this change, the super admin's username will remain stored under the `uid` attribute instead of `mail`, which can cause issues.
120+
121+
In the `<Dialect dialectURI="http://wso2.org/claims">` dialect, locate the `<Claim>` element with `ClaimURI` as `http://wso2.org/claims/username` and update the `AttributeID` from `uid` to `mail`:
122+
123+
``` xml
124+
<Claim>
125+
<ClaimURI>http://wso2.org/claims/username</ClaimURI>
126+
<DisplayName>Username</DisplayName>
127+
<AttributeID>mail</AttributeID>
128+
<Description>Username</Description>
129+
<SharedProfileValueResolvingMethod>FromOrigin</SharedProfileValueResolvingMethod>
130+
</Claim>
131+
```
132+
133+
8. Restart the server.

en/identity-server/next/docs/guides/users/attributes/enable-email-as-username.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,4 +111,23 @@
111111
</tbody>
112112
</table>
113113

114-
7. Restart the server.
114+
7. Update the username claim mapping in the `<IS_HOME>/repository/conf/claim-config.xml` file.
115+
116+
!!! warning "Important"
117+
By default, the claim `http://wso2.org/claims/username` is mapped to the `uid` attribute in the userstore. When enabling email as username, this mapping must be changed to `mail` to ensure the username is correctly stored and retrieved from the userstore.
118+
119+
Without this change, the super admin's username will remain stored under the `uid` attribute instead of `mail`, which can cause issues.
120+
121+
In the `<Dialect dialectURI="http://wso2.org/claims">` dialect, locate the `<Claim>` element with `ClaimURI` as `http://wso2.org/claims/username` and update the `AttributeID` from `uid` to `mail`:
122+
123+
``` xml
124+
<Claim>
125+
<ClaimURI>http://wso2.org/claims/username</ClaimURI>
126+
<DisplayName>Username</DisplayName>
127+
<AttributeID>mail</AttributeID>
128+
<Description>Username</Description>
129+
<SharedProfileValueResolvingMethod>FromOrigin</SharedProfileValueResolvingMethod>
130+
</Claim>
131+
```
132+
133+
8. Restart the server.

0 commit comments

Comments
 (0)