Skip to content

Commit dccd129

Browse files
pstack2021michaelklishin
authored andcommitted
Update oauth2.md
Some more updates for me review, again can you quickly look through them to ensure all is good, thanks @MarcialRosales
1 parent acc311a commit dccd129

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

site/oauth2.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -317,20 +317,20 @@ the `monitoring` tag will be `my_rabbit.tag:monitoring`.
317317

318318
### <a id="preferred-username-claims" class="anchor" href="#preferred-username-claims">Preferred username claims</a>
319319

320-
RabbitMQ needs to figure out the username associated to the token so that it can display it in the management ui.
321-
By default, RabbitMQ will first look for the `sub` claim and if it is not found it uses the `client_id`.
320+
RabbitMQ The username associated with the token must be available to RabbitMQ so that this username is displayed in the RabbitMQ Management UI.
321+
By default, RabbitMQ searches for the `sub` claim first, and if it is not found, RabbitMQ uses the `client_id`.
322322

323-
Most authorization servers return the user's GUID in the `sub` claim rather than the actual user's username or email address, anything the user can relate to. When the `sub` claim does not carry a *user-friendly username*, you can configure one or several claims to extract the username from the token.
323+
Most authorization servers return the user's GUID in the `sub` claim instead of the user's username or email address, anything the user can relate to. When the `sub` claim does not carry a *user-friendly username*, you can configure one or several claims to extract the username from the token.
324324

325-
Given this configuration;
325+
Example configuration:
326326
<pre class="lang-erlang">
327327
...
328328
{rabbitmq_auth_backend_oauth2, [
329329
{resource_server_id, &lt;&lt;"rabbitmq"&gt;&gt;},
330330
{preferred_username_claims, [&lt;&lt;"user_name"&gt;&gt;,&lt;&lt;"email"&gt;&gt;]},
331331
...
332332
</pre>
333-
RabbitMQ would first look for the `user_name` claim and if it is not found it looks for `email`. Else it uses its default lookup mechanism which first looks for `sub` and then `client_id`.
333+
In the example configuration, RabbitMQ searches for the `user_name` claim first and if it is not found, RabbitMQ searches for the `email`. If these are not found, RabbitMQ uses its default lookup mechanism which first looks for `sub` and then `client_id`.
334334

335335
### <a id="token-expiration" class="anchor" href="#token-expiration">Token Expiration and Refresh</a>
336336

0 commit comments

Comments
 (0)