···66and this project adheres to
77[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
8899-<!-- ## [Unreleased] -->
99+## [Unreleased]
1010+1111+### Added
1212+1313+- The PLC directory used for identity resolution can now be configured. See
1414+ `Atex.Config.IdentityResolve` for more information. (Thanks
1515+ [@hexmani.ac](https://tangled.org/did:plc:5szlrh3xkfxxsuu4mo6oe6h7)!)
1616+- Add an extra optional `opts` parameter to some `Atex.OAuth` functions, to
1717+ allow for better integration with other ecosystems. (Thanks
1818+ [@lekkice.moe](https://tangled.org/did:plc:dgzvruva4jbzqbta335jtvoz)!)
10191120## [0.7.0] - 2026-01-07
1221
+25-21
lib/atex/oauth.ex
···4646 expires_at: NaiveDateTime.t()
4747 }
48484949- alias Atex.Config.OAuth, as: Config
5050-5151- @doc """
5252- Get a map cnotaining the client metadata information needed for an
5353- authorization server to validate this client.
5454- """
5549 @type create_client_metadata_option ::
5650 {:key, JOSE.JWK.t()}
5751 | {:client_id, String.t()}
5852 | {:redirect_uri, String.t()}
5953 | {:extra_redirect_uris, list(String.t())}
6054 | {:scopes, String.t()}
5555+5656+ @type create_authorization_url_option ::
5757+ {:key, JOSE.JWK.t()}
5858+ | {:client_id, String.t()}
5959+ | {:redirect_uri, String.t()}
6060+ | {:scopes, String.t()}
6161+6262+ @type validate_authorization_code_option ::
6363+ {:key, JOSE.JWK.t()}
6464+ | {:client_id, String.t()}
6565+ | {:redirect_uri, String.t()}
6666+ | {:scopes, String.t()}
6767+6868+ @type refresh_token_option ::
6969+ {:key, JOSE.JWK.t()}
7070+ | {:client_id, String.t()}
7171+ | {:redirect_uri, String.t()}
7272+ | {:scopes, String.t()}
7373+7474+ alias Atex.Config.OAuth, as: Config
7575+7676+ @doc """
7777+ Get a map containing the client metadata information needed for an
7878+ authorization server to validate this client.
7979+ """
6180 @spec create_client_metadata(list(create_client_metadata_option())) :: map()
6281 def create_client_metadata(opts \\ []) do
6382 opts =
···145164 - `{:ok, :invalid_par_response}` - Server respondend incorrectly to the request
146165 - `{:error, reason}` - Error creating authorization URL
147166 """
148148- @type create_authorization_url_option ::
149149- {:key, JOSE.JWK.t()}
150150- | {:client_id, String.t()}
151151- | {:redirect_uri, String.t()}
152152- | {:scopes, String.t()}
153167 @spec create_authorization_url(
154168 authorization_metadata(),
155169 String.t(),
···231245 - `{:ok, tokens, nonce}` - Successfully obtained tokens with returned DPoP nonce
232246 - `{:error, reason}` - Error exchanging code for tokens
233247 """
234234- @type validate_authorization_code_option ::
235235- {:key, JOSE.JWK.t()}
236236- | {:client_id, String.t()}
237237- | {:redirect_uri, String.t()}
238238- | {:scopes, String.t()}
239248 @spec validate_authorization_code(
240249 authorization_metadata(),
241250 JOSE.JWK.t(),
···301310 end
302311 end
303312304304- @type refresh_token_option ::
305305- {:key, JOSE.JWK.t()}
306306- | {:client_id, String.t()}
307307- | {:redirect_uri, String.t()}
308308- | {:scopes, String.t()}
309313 @spec refresh_token(
310314 String.t(),
311315 JOSE.JWK.t(),