A set of utilities for working with the AT Protocol in Elixir.

docs: update changelog

ovyerus.com ed865a6b c2c66aef

verified
+35 -22
+10 -1
CHANGELOG.md
··· 6 and this project adheres to 7 [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 8 9 - <!-- ## [Unreleased] --> 10 11 ## [0.7.0] - 2026-01-07 12
··· 6 and this project adheres to 7 [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 8 9 + ## [Unreleased] 10 + 11 + ### Added 12 + 13 + - The PLC directory used for identity resolution can now be configured. See 14 + `Atex.Config.IdentityResolve` for more information. (Thanks 15 + [@hexmani.ac](https://tangled.org/did:plc:5szlrh3xkfxxsuu4mo6oe6h7)!) 16 + - Add an extra optional `opts` parameter to some `Atex.OAuth` functions, to 17 + allow for better integration with other ecosystems. (Thanks 18 + [@lekkice.moe](https://tangled.org/did:plc:dgzvruva4jbzqbta335jtvoz)!) 19 20 ## [0.7.0] - 2026-01-07 21
+25 -21
lib/atex/oauth.ex
··· 46 expires_at: NaiveDateTime.t() 47 } 48 49 - alias Atex.Config.OAuth, as: Config 50 - 51 - @doc """ 52 - Get a map cnotaining the client metadata information needed for an 53 - authorization server to validate this client. 54 - """ 55 @type create_client_metadata_option :: 56 {:key, JOSE.JWK.t()} 57 | {:client_id, String.t()} 58 | {:redirect_uri, String.t()} 59 | {:extra_redirect_uris, list(String.t())} 60 | {:scopes, String.t()} 61 @spec create_client_metadata(list(create_client_metadata_option())) :: map() 62 def create_client_metadata(opts \\ []) do 63 opts = ··· 145 - `{:ok, :invalid_par_response}` - Server respondend incorrectly to the request 146 - `{:error, reason}` - Error creating authorization URL 147 """ 148 - @type create_authorization_url_option :: 149 - {:key, JOSE.JWK.t()} 150 - | {:client_id, String.t()} 151 - | {:redirect_uri, String.t()} 152 - | {:scopes, String.t()} 153 @spec create_authorization_url( 154 authorization_metadata(), 155 String.t(), ··· 231 - `{:ok, tokens, nonce}` - Successfully obtained tokens with returned DPoP nonce 232 - `{:error, reason}` - Error exchanging code for tokens 233 """ 234 - @type validate_authorization_code_option :: 235 - {:key, JOSE.JWK.t()} 236 - | {:client_id, String.t()} 237 - | {:redirect_uri, String.t()} 238 - | {:scopes, String.t()} 239 @spec validate_authorization_code( 240 authorization_metadata(), 241 JOSE.JWK.t(), ··· 301 end 302 end 303 304 - @type refresh_token_option :: 305 - {:key, JOSE.JWK.t()} 306 - | {:client_id, String.t()} 307 - | {:redirect_uri, String.t()} 308 - | {:scopes, String.t()} 309 @spec refresh_token( 310 String.t(), 311 JOSE.JWK.t(),
··· 46 expires_at: NaiveDateTime.t() 47 } 48 49 @type create_client_metadata_option :: 50 {:key, JOSE.JWK.t()} 51 | {:client_id, String.t()} 52 | {:redirect_uri, String.t()} 53 | {:extra_redirect_uris, list(String.t())} 54 | {:scopes, String.t()} 55 + 56 + @type create_authorization_url_option :: 57 + {:key, JOSE.JWK.t()} 58 + | {:client_id, String.t()} 59 + | {:redirect_uri, String.t()} 60 + | {:scopes, String.t()} 61 + 62 + @type validate_authorization_code_option :: 63 + {:key, JOSE.JWK.t()} 64 + | {:client_id, String.t()} 65 + | {:redirect_uri, String.t()} 66 + | {:scopes, String.t()} 67 + 68 + @type refresh_token_option :: 69 + {:key, JOSE.JWK.t()} 70 + | {:client_id, String.t()} 71 + | {:redirect_uri, String.t()} 72 + | {:scopes, String.t()} 73 + 74 + alias Atex.Config.OAuth, as: Config 75 + 76 + @doc """ 77 + Get a map containing the client metadata information needed for an 78 + authorization server to validate this client. 79 + """ 80 @spec create_client_metadata(list(create_client_metadata_option())) :: map() 81 def create_client_metadata(opts \\ []) do 82 opts = ··· 164 - `{:ok, :invalid_par_response}` - Server respondend incorrectly to the request 165 - `{:error, reason}` - Error creating authorization URL 166 """ 167 @spec create_authorization_url( 168 authorization_metadata(), 169 String.t(), ··· 245 - `{:ok, tokens, nonce}` - Successfully obtained tokens with returned DPoP nonce 246 - `{:error, reason}` - Error exchanging code for tokens 247 """ 248 @spec validate_authorization_code( 249 authorization_metadata(), 250 JOSE.JWK.t(), ··· 310 end 311 end 312 313 @spec refresh_token( 314 String.t(), 315 JOSE.JWK.t(),