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 6 and this project adheres to 7 7 [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 8 8 9 - <!-- ## [Unreleased] --> 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)!) 10 19 11 20 ## [0.7.0] - 2026-01-07 12 21
+25 -21
lib/atex/oauth.ex
··· 46 46 expires_at: NaiveDateTime.t() 47 47 } 48 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 49 @type create_client_metadata_option :: 56 50 {:key, JOSE.JWK.t()} 57 51 | {:client_id, String.t()} 58 52 | {:redirect_uri, String.t()} 59 53 | {:extra_redirect_uris, list(String.t())} 60 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 + """ 61 80 @spec create_client_metadata(list(create_client_metadata_option())) :: map() 62 81 def create_client_metadata(opts \\ []) do 63 82 opts = ··· 145 164 - `{:ok, :invalid_par_response}` - Server respondend incorrectly to the request 146 165 - `{:error, reason}` - Error creating authorization URL 147 166 """ 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 167 @spec create_authorization_url( 154 168 authorization_metadata(), 155 169 String.t(), ··· 231 245 - `{:ok, tokens, nonce}` - Successfully obtained tokens with returned DPoP nonce 232 246 - `{:error, reason}` - Error exchanging code for tokens 233 247 """ 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 248 @spec validate_authorization_code( 240 249 authorization_metadata(), 241 250 JOSE.JWK.t(), ··· 301 310 end 302 311 end 303 312 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 313 @spec refresh_token( 310 314 String.t(), 311 315 JOSE.JWK.t(),