You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/OAUTH_SUPPORT.md
+14-7Lines changed: 14 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -95,12 +95,15 @@ cargo run --example oauth-client
95
95
96
96
## Authorization Flow Description
97
97
98
-
1.**Metadata Discovery**: Client attempts to get authorization server metadata from `/.well-known/oauth-authorization-server`
99
-
2.**Client Registration**: If supported, client dynamically registers itself
100
-
3.**Authorization Request**: Build authorization URL with PKCE and guide user to access
101
-
4.**Authorization Code Exchange**: After user authorization, exchange authorization code for access token
102
-
5.**Token Usage**: Use access token for API calls
103
-
6.**Token Refresh**: Automatically use refresh token to get new access token when current one expires
98
+
1.**Resource Metadata Discovery**: Client probes the server and extracts `WWW-Authenticate` parameters including `resource_metadata` URL and `scope`
99
+
2.**Protected Resource Metadata**: Client fetches resource server metadata (RFC 9728) to find authorization server(s) and supported scopes
100
+
3.**AS Metadata Discovery**: Client discovers authorization server metadata via RFC 8414 and OpenID Connect well-known endpoints
101
+
4.**Client Registration**: If supported, client dynamically registers itself (or uses URL-based Client ID via SEP-991)
102
+
5.**Scope Selection**: SDK picks scopes from WWW-Authenticate > PRM > AS metadata > caller defaults
103
+
6.**Authorization Request**: Build authorization URL with PKCE (S256) and RFC 8707 resource parameter
104
+
7.**Authorization Code Exchange**: After user authorization, exchange code for access token (with resource parameter)
105
+
8.**Token Usage**: Use access token for API calls via `AuthClient` or `AuthorizedHttpClient`
106
+
9.**Token Refresh**: Automatically use refresh token to get new access token when current one expires; previously granted scopes are forwarded in the refresh request so providers that require them (e.g. Azure AD v2) work correctly
104
107
105
108
## Security Considerations
106
109
@@ -123,4 +126,8 @@ If you encounter authorization issues, check the following:
0 commit comments