chore(deps): Bump assent from 0.2.7 to 0.2.8 (#506)

* chore(deps): Bump assent from 0.2.7 to 0.2.8

Bumps [assent](https://github.com/pow-auth/assent) from 0.2.7 to 0.2.8.
- [Release notes](https://github.com/pow-auth/assent/releases)
- [Changelog](https://github.com/pow-auth/assent/blob/main/CHANGELOG.md)
- [Commits](https://github.com/pow-auth/assent/compare/v0.2.7...v0.2.8)

---
updated-dependencies:
- dependency-name: assent
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(OAuth2): Reflect `assent` `site` -> `base_url` change.

I considered just rewriting it behind the scenes, but I think it's probably better in the long run if we just emit a deprecation.

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: James Harton <james@harton.nz>
This commit is contained in:
dependabot[bot] 2023-11-22 10:49:07 +13:00 committed by GitHub
parent f4df60337d
commit 408a28ccf4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 358 additions and 231 deletions

View file

@ -8,6 +8,7 @@ spark_locals_without_parens = [
auth_method: 1,
authorization_params: 1,
authorize_url: 1,
base_url: 1,
client_authentication_method: 1,
client_id: 1,
client_secret: 1,

View file

@ -31,7 +31,7 @@ config :ash_authentication,
client_id: System.get_env("OAUTH2_CLIENT_ID"),
redirect_uri: "http://localhost:4000/auth",
client_secret: System.get_env("OAUTH2_CLIENT_SECRET"),
site: System.get_env("OAUTH2_SITE"),
base_url: System.get_env("OAUTH2_SITE"),
authorize_url: "#{System.get_env("OAUTH2_SITE")}/authorize",
token_url: "#{System.get_env("OAUTH2_SITE")}/oauth/token",
user_url: "#{System.get_env("OAUTH2_SITE")}/userinfo"
@ -40,7 +40,7 @@ config :ash_authentication,
client_id: System.get_env("OAUTH2_CLIENT_ID"),
redirect_uri: "http://localhost:4000/auth",
client_secret: System.get_env("OAUTH2_CLIENT_SECRET"),
site: System.get_env("OAUTH2_SITE")
base_url: System.get_env("OAUTH2_SITE")
],
github: [
client_id: System.get_env("GITHUB_CLIENT_ID"),
@ -52,7 +52,7 @@ config :ash_authentication,
client_id: System.get_env("OAUTH2_CLIENT_ID"),
client_secret: System.get_env("OAUTH2_CLIENT_SECRET"),
redirect_uri: "http://localhost:4000/auth",
site: System.get_env("OAUTH2_SITE"),
base_url: System.get_env("OAUTH2_SITE"),
token_url: "#{System.get_env("OAUTH2_SITE")}/oauth/token"
]
],

View file

@ -21,7 +21,7 @@ config :ash_authentication,
client_id: "pretend client id",
redirect_uri: "http://localhost:4000/auth",
client_secret: "pretend client secret",
site: "https://example.com/",
base_url: "https://example.com/",
authorize_url: "https://example.com/authorize",
token_url: "https://example.com/oauth/token",
user_url: "https://example.com/userinfo"

View file

@ -63,7 +63,7 @@ The following defaults are applied:
end
```
* `:site` - Required. The base URL of the OAuth2 server - including the leading protocol
* `:base_url` - The base URL of the OAuth2 server - including the leading protocol
(ie `https://`).
Takes either a module which implements the `AshAuthentication.Secret`
behaviour, a 2 arity anonymous function or a string.
@ -72,13 +72,15 @@ The following defaults are applied:
Example:
```elixir
site fn _, resource ->
base_url fn _, resource ->
:my_app
|> Application.get_env(resource, [])
|> Keyword.fetch(:oauth_site)
end
```
* `:site` - Deprecated: Use `base_url` instead.
* `:auth_method` - The authentication strategy used, optional. If not set, no
authentication will be used during the access token request. The
value may be one of the following:
@ -329,46 +331,6 @@ end
</td>
</tr>
<tr>
<td style="text-align: left">
<a id="authentication-strategies-auth0-site" href="#authentication-strategies-auth0-site">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
site
</span>
</a>
<sup style="color: red">*</sup>
</td>
<td style="text-align: left">
<code class="inline">(any, any -> any) | module | String.t</code>
</td>
<td style="text-align: left">
</td>
<td style="text-align: left" colspan=2>
The base URL of the OAuth2 server - including the leading protocol
(ie `https://`).
Takes either a module which implements the `AshAuthentication.Secret`
behaviour, a 2 arity anonymous function or a string.
See the module documentation for `AshAuthentication.Secret` for more
information.
Example:
```elixir
site fn _, resource ->
:my_app
|> Application.get_env(resource, [])
|> Keyword.fetch(:oauth_site)
end
```
</td>
</tr>
<tr>
<td style="text-align: left">
<a id="authentication-strategies-auth0-authorize_url" href="#authentication-strategies-auth0-authorize_url">
@ -516,6 +478,65 @@ information.
</td>
</tr>
<tr>
<td style="text-align: left">
<a id="authentication-strategies-auth0-base_url" href="#authentication-strategies-auth0-base_url">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
base_url
</span>
</a>
</td>
<td style="text-align: left">
<code class="inline">(any, any -> any) | module | String.t</code>
</td>
<td style="text-align: left">
</td>
<td style="text-align: left" colspan=2>
The base URL of the OAuth2 server - including the leading protocol
(ie `https://`).
Takes either a module which implements the `AshAuthentication.Secret`
behaviour, a 2 arity anonymous function or a string.
See the module documentation for `AshAuthentication.Secret` for more
information.
Example:
```elixir
base_url fn _, resource ->
:my_app
|> Application.get_env(resource, [])
|> Keyword.fetch(:oauth_site)
end
```
</td>
</tr>
<tr>
<td style="text-align: left">
<a id="authentication-strategies-auth0-site" href="#authentication-strategies-auth0-site">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
site
</span>
</a>
</td>
<td style="text-align: left">
<code class="inline">(any, any -> any) | module | String.t</code>
</td>
<td style="text-align: left">
</td>
<td style="text-align: left" colspan=2>
Deprecated: Use `base_url` instead.
</td>
</tr>
<tr>
<td style="text-align: left">
<a id="authentication-strategies-auth0-auth_method" href="#authentication-strategies-auth0-auth_method">

View file

@ -31,7 +31,7 @@ in our documentation.
The following defaults are applied:
* `:site` is set to `"https://api.github.com"`.
* `:base_url` is set to `"https://api.github.com"`.
* `:authorize_url` is set to `"https://github.com/login/oauth/authorize"`.
* `:token_url` is set to `"https://github.com/login/oauth/access_token"`.
* `:user_url` is set to `"/user"`.
@ -64,7 +64,7 @@ The following defaults are applied:
end
```
* `:site` - Required. The base URL of the OAuth2 server - including the leading protocol
* `:base_url` - The base URL of the OAuth2 server - including the leading protocol
(ie `https://`).
Takes either a module which implements the `AshAuthentication.Secret`
behaviour, a 2 arity anonymous function or a string.
@ -73,13 +73,15 @@ The following defaults are applied:
Example:
```elixir
site fn _, resource ->
base_url fn _, resource ->
:my_app
|> Application.get_env(resource, [])
|> Keyword.fetch(:oauth_site)
end
```
* `:site` - Deprecated: Use `base_url` instead.
* `:auth_method` - The authentication strategy used, optional. If not set, no
authentication will be used during the access token request. The
value may be one of the following:
@ -229,7 +231,7 @@ in our documentation.
The following defaults are applied:
* `:site` is set to `"https://api.github.com"`.
* `:base_url` is set to `"https://api.github.com"`.
* `:authorize_url` is set to `"https://github.com/login/oauth/authorize"`.
* `:token_url` is set to `"https://github.com/login/oauth/access_token"`.
* `:user_url` is set to `"/user"`.
@ -332,46 +334,6 @@ end
</td>
</tr>
<tr>
<td style="text-align: left">
<a id="authentication-strategies-github-site" href="#authentication-strategies-github-site">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
site
</span>
</a>
<sup style="color: red">*</sup>
</td>
<td style="text-align: left">
<code class="inline">(any, any -> any) | module | String.t</code>
</td>
<td style="text-align: left">
</td>
<td style="text-align: left" colspan=2>
The base URL of the OAuth2 server - including the leading protocol
(ie `https://`).
Takes either a module which implements the `AshAuthentication.Secret`
behaviour, a 2 arity anonymous function or a string.
See the module documentation for `AshAuthentication.Secret` for more
information.
Example:
```elixir
site fn _, resource ->
:my_app
|> Application.get_env(resource, [])
|> Keyword.fetch(:oauth_site)
end
```
</td>
</tr>
<tr>
<td style="text-align: left">
<a id="authentication-strategies-github-authorize_url" href="#authentication-strategies-github-authorize_url">
@ -519,6 +481,65 @@ information.
</td>
</tr>
<tr>
<td style="text-align: left">
<a id="authentication-strategies-github-base_url" href="#authentication-strategies-github-base_url">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
base_url
</span>
</a>
</td>
<td style="text-align: left">
<code class="inline">(any, any -> any) | module | String.t</code>
</td>
<td style="text-align: left">
</td>
<td style="text-align: left" colspan=2>
The base URL of the OAuth2 server - including the leading protocol
(ie `https://`).
Takes either a module which implements the `AshAuthentication.Secret`
behaviour, a 2 arity anonymous function or a string.
See the module documentation for `AshAuthentication.Secret` for more
information.
Example:
```elixir
base_url fn _, resource ->
:my_app
|> Application.get_env(resource, [])
|> Keyword.fetch(:oauth_site)
end
```
</td>
</tr>
<tr>
<td style="text-align: left">
<a id="authentication-strategies-github-site" href="#authentication-strategies-github-site">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
site
</span>
</a>
</td>
<td style="text-align: left">
<code class="inline">(any, any -> any) | module | String.t</code>
</td>
<td style="text-align: left">
</td>
<td style="text-align: left" colspan=2>
Deprecated: Use `base_url` instead.
</td>
</tr>
<tr>
<td style="text-align: left">
<a id="authentication-strategies-github-auth_method" href="#authentication-strategies-github-auth_method">

View file

@ -32,7 +32,7 @@ for Google setup details.
The following defaults are applied:
* `:site` is set to `"https://www.googleapis.com"`.
* `:base_url` is set to `"https://www.googleapis.com"`.
* `:authorize_url` is set to `"https://accounts.google.com/o/oauth2/v2/auth"`.
* `:token_url` is set to `"/oauth2/v4/token"`.
* `:user_url` is set to `"/oauth2/v3/userinfo"`.
@ -64,7 +64,7 @@ The following defaults are applied:
end
```
* `:site` - Required. The base URL of the OAuth2 server - including the leading protocol
* `:base_url` - The base URL of the OAuth2 server - including the leading protocol
(ie `https://`).
Takes either a module which implements the `AshAuthentication.Secret`
behaviour, a 2 arity anonymous function or a string.
@ -73,13 +73,15 @@ The following defaults are applied:
Example:
```elixir
site fn _, resource ->
base_url fn _, resource ->
:my_app
|> Application.get_env(resource, [])
|> Keyword.fetch(:oauth_site)
end
```
* `:site` - Deprecated: Use `base_url` instead.
* `:auth_method` - The authentication strategy used, optional. If not set, no
authentication will be used during the access token request. The
value may be one of the following:
@ -229,7 +231,7 @@ for Google setup details.
The following defaults are applied:
* `:site` is set to `"https://www.googleapis.com"`.
* `:base_url` is set to `"https://www.googleapis.com"`.
* `:authorize_url` is set to `"https://accounts.google.com/o/oauth2/v2/auth"`.
* `:token_url` is set to `"/oauth2/v4/token"`.
* `:user_url` is set to `"/oauth2/v3/userinfo"`.
@ -331,46 +333,6 @@ end
</td>
</tr>
<tr>
<td style="text-align: left">
<a id="authentication-strategies-google-site" href="#authentication-strategies-google-site">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
site
</span>
</a>
<sup style="color: red">*</sup>
</td>
<td style="text-align: left">
<code class="inline">(any, any -> any) | module | String.t</code>
</td>
<td style="text-align: left">
</td>
<td style="text-align: left" colspan=2>
The base URL of the OAuth2 server - including the leading protocol
(ie `https://`).
Takes either a module which implements the `AshAuthentication.Secret`
behaviour, a 2 arity anonymous function or a string.
See the module documentation for `AshAuthentication.Secret` for more
information.
Example:
```elixir
site fn _, resource ->
:my_app
|> Application.get_env(resource, [])
|> Keyword.fetch(:oauth_site)
end
```
</td>
</tr>
<tr>
<td style="text-align: left">
<a id="authentication-strategies-google-authorize_url" href="#authentication-strategies-google-authorize_url">
@ -518,6 +480,65 @@ information.
</td>
</tr>
<tr>
<td style="text-align: left">
<a id="authentication-strategies-google-base_url" href="#authentication-strategies-google-base_url">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
base_url
</span>
</a>
</td>
<td style="text-align: left">
<code class="inline">(any, any -> any) | module | String.t</code>
</td>
<td style="text-align: left">
</td>
<td style="text-align: left" colspan=2>
The base URL of the OAuth2 server - including the leading protocol
(ie `https://`).
Takes either a module which implements the `AshAuthentication.Secret`
behaviour, a 2 arity anonymous function or a string.
See the module documentation for `AshAuthentication.Secret` for more
information.
Example:
```elixir
base_url fn _, resource ->
:my_app
|> Application.get_env(resource, [])
|> Keyword.fetch(:oauth_site)
end
```
</td>
</tr>
<tr>
<td style="text-align: left">
<a id="authentication-strategies-google-site" href="#authentication-strategies-google-site">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
site
</span>
</a>
</td>
<td style="text-align: left">
<code class="inline">(any, any -> any) | module | String.t</code>
</td>
<td style="text-align: left">
</td>
<td style="text-align: left" colspan=2>
Deprecated: Use `base_url` instead.
</td>
</tr>
<tr>
<td style="text-align: left">
<a id="authentication-strategies-google-auth_method" href="#authentication-strategies-google-auth_method">

View file

@ -243,7 +243,7 @@ OAuth2 authentication
end
```
* `:site` - Required. The base URL of the OAuth2 server - including the leading protocol
* `:base_url` - The base URL of the OAuth2 server - including the leading protocol
(ie `https://`).
Takes either a module which implements the `AshAuthentication.Secret`
behaviour, a 2 arity anonymous function or a string.
@ -252,13 +252,15 @@ OAuth2 authentication
Example:
```elixir
site fn _, resource ->
base_url fn _, resource ->
:my_app
|> Application.get_env(resource, [])
|> Keyword.fetch(:oauth_site)
end
```
* `:site` - Deprecated: Use `base_url` instead.
* `:auth_method` - The authentication strategy used, optional. If not set, no
authentication will be used during the access token request. The
value may be one of the following:
@ -489,46 +491,6 @@ end
</td>
</tr>
<tr>
<td style="text-align: left">
<a id="authentication-strategies-oauth2-site" href="#authentication-strategies-oauth2-site">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
site
</span>
</a>
<sup style="color: red">*</sup>
</td>
<td style="text-align: left">
<code class="inline">(any, any -> any) | module | String.t</code>
</td>
<td style="text-align: left">
</td>
<td style="text-align: left" colspan=2>
The base URL of the OAuth2 server - including the leading protocol
(ie `https://`).
Takes either a module which implements the `AshAuthentication.Secret`
behaviour, a 2 arity anonymous function or a string.
See the module documentation for `AshAuthentication.Secret` for more
information.
Example:
```elixir
site fn _, resource ->
:my_app
|> Application.get_env(resource, [])
|> Keyword.fetch(:oauth_site)
end
```
</td>
</tr>
<tr>
<td style="text-align: left">
<a id="authentication-strategies-oauth2-authorize_url" href="#authentication-strategies-oauth2-authorize_url">
@ -676,6 +638,65 @@ information.
</td>
</tr>
<tr>
<td style="text-align: left">
<a id="authentication-strategies-oauth2-base_url" href="#authentication-strategies-oauth2-base_url">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
base_url
</span>
</a>
</td>
<td style="text-align: left">
<code class="inline">(any, any -> any) | module | String.t</code>
</td>
<td style="text-align: left">
</td>
<td style="text-align: left" colspan=2>
The base URL of the OAuth2 server - including the leading protocol
(ie `https://`).
Takes either a module which implements the `AshAuthentication.Secret`
behaviour, a 2 arity anonymous function or a string.
See the module documentation for `AshAuthentication.Secret` for more
information.
Example:
```elixir
base_url fn _, resource ->
:my_app
|> Application.get_env(resource, [])
|> Keyword.fetch(:oauth_site)
end
```
</td>
</tr>
<tr>
<td style="text-align: left">
<a id="authentication-strategies-oauth2-site" href="#authentication-strategies-oauth2-site">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
site
</span>
</a>
</td>
<td style="text-align: left">
<code class="inline">(any, any -> any) | module | String.t</code>
</td>
<td style="text-align: left">
</td>
<td style="text-align: left" colspan=2>
Deprecated: Use `base_url` instead.
</td>
</tr>
<tr>
<td style="text-align: left">
<a id="authentication-strategies-oauth2-auth_method" href="#authentication-strategies-oauth2-auth_method">

View file

@ -79,7 +79,7 @@ all the same configuration options should you need them.
end
```
* `:site` - Required. The base URL of the OAuth2 server - including the leading protocol
* `:base_url` - The base URL of the OAuth2 server - including the leading protocol
(ie `https://`).
Takes either a module which implements the `AshAuthentication.Secret`
behaviour, a 2 arity anonymous function or a string.
@ -88,13 +88,15 @@ all the same configuration options should you need them.
Example:
```elixir
site fn _, resource ->
base_url fn _, resource ->
:my_app
|> Application.get_env(resource, [])
|> Keyword.fetch(:oauth_site)
end
```
* `:site` - Deprecated: Use `base_url` instead.
* `:auth_method` - The authentication strategy used, optional. If not set, no
authentication will be used during the access token request. The
value may be one of the following:
@ -353,46 +355,6 @@ end
</td>
</tr>
<tr>
<td style="text-align: left">
<a id="authentication-strategies-oidc-site" href="#authentication-strategies-oidc-site">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
site
</span>
</a>
<sup style="color: red">*</sup>
</td>
<td style="text-align: left">
<code class="inline">(any, any -> any) | module | String.t</code>
</td>
<td style="text-align: left">
</td>
<td style="text-align: left" colspan=2>
The base URL of the OAuth2 server - including the leading protocol
(ie `https://`).
Takes either a module which implements the `AshAuthentication.Secret`
behaviour, a 2 arity anonymous function or a string.
See the module documentation for `AshAuthentication.Secret` for more
information.
Example:
```elixir
site fn _, resource ->
:my_app
|> Application.get_env(resource, [])
|> Keyword.fetch(:oauth_site)
end
```
</td>
</tr>
<tr>
<td style="text-align: left">
<a id="authentication-strategies-oidc-authorize_url" href="#authentication-strategies-oidc-authorize_url">
@ -503,6 +465,65 @@ information.
</td>
</tr>
<tr>
<td style="text-align: left">
<a id="authentication-strategies-oidc-base_url" href="#authentication-strategies-oidc-base_url">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
base_url
</span>
</a>
</td>
<td style="text-align: left">
<code class="inline">(any, any -> any) | module | String.t</code>
</td>
<td style="text-align: left">
</td>
<td style="text-align: left" colspan=2>
The base URL of the OAuth2 server - including the leading protocol
(ie `https://`).
Takes either a module which implements the `AshAuthentication.Secret`
behaviour, a 2 arity anonymous function or a string.
See the module documentation for `AshAuthentication.Secret` for more
information.
Example:
```elixir
base_url fn _, resource ->
:my_app
|> Application.get_env(resource, [])
|> Keyword.fetch(:oauth_site)
end
```
</td>
</tr>
<tr>
<td style="text-align: left">
<a id="authentication-strategies-oidc-site" href="#authentication-strategies-oidc-site">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
site
</span>
</a>
</td>
<td style="text-align: left">
<code class="inline">(any, any -> any) | module | String.t</code>
</td>
<td style="text-align: left">
</td>
<td style="text-align: left" colspan=2>
Deprecated: Use `base_url` instead.
</td>
</tr>
<tr>
<td style="text-align: left">
<a id="authentication-strategies-oidc-auth_method" href="#authentication-strategies-oidc-auth_method">

View file

@ -227,6 +227,7 @@ defmodule AshAuthentication.Strategy.OAuth2 do
auth_method: :client_secret_post,
authorization_params: [],
authorize_url: nil,
base_url: nil,
client_authentication_method: nil,
client_id: nil,
client_secret: nil,
@ -272,6 +273,7 @@ defmodule AshAuthentication.Strategy.OAuth2 do
| :private_key_jwt,
authorization_params: keyword,
authorize_url: secret,
base_url: secret,
client_authentication_method: nil | atom,
client_id: secret,
client_secret: secret,

View file

@ -19,6 +19,7 @@ defmodule AshAuthentication.Strategy.OAuth2.Dsl do
target: OAuth2,
modules: [
:authorize_url,
:base_url,
:client_id,
:client_secret,
:identity_resource,
@ -55,7 +56,7 @@ defmodule AshAuthentication.Strategy.OAuth2.Dsl do
""",
required: true
],
site: [
base_url: [
type: secret_type,
doc: """
The base URL of the OAuth2 server - including the leading protocol
@ -66,14 +67,19 @@ defmodule AshAuthentication.Strategy.OAuth2.Dsl do
Example:
```elixir
site fn _, resource ->
base_url fn _, resource ->
:my_app
|> Application.get_env(resource, [])
|> Keyword.fetch(:oauth_site)
end
```
""",
required: true
required: false
],
site: [
type: secret_type,
doc: "Deprecated: Use `base_url` instead.",
required: false
],
auth_method: [
type:
@ -296,7 +302,20 @@ defmodule AshAuthentication.Strategy.OAuth2.Dsl do
default: :oauth2
]
],
auto_set_fields: [assent_strategy: Assent.Strategy.OAuth2]
deprecations: [site: "As of assent v0.2.8 please use `base_url` instead."],
auto_set_fields: [assent_strategy: Assent.Strategy.OAuth2],
transform: {__MODULE__, :transform, []}
}
end
@doc false
@spec transform(Custom.entity()) :: {:ok, Custom.entity()} | {:error, any}
def transform(entity) do
handle_site_deprecation(entity)
end
defp handle_site_deprecation(entity) when is_nil(entity.base_url) and not is_nil(entity.site),
do: {:ok, %{entity | base_url: entity.site, site: nil}}
defp handle_site_deprecation(entity), do: {:ok, entity}
end

View file

@ -87,7 +87,7 @@ defmodule AshAuthentication.Strategy.OAuth2.Plug do
with {:ok, config} <- add_secret_value(config, strategy, :authorize_url),
{:ok, config} <- add_secret_value(config, strategy, :client_id),
{:ok, config} <- add_secret_value(config, strategy, :client_secret),
{:ok, config} <- add_secret_value(config, strategy, :site),
{:ok, config} <- add_secret_value(config, strategy, :base_url),
{:ok, config} <- add_secret_value(config, strategy, :token_url),
{:ok, config} <- add_secret_value(config, strategy, :user_url, !!strategy.authorize_url),
{:ok, redirect_uri} <- build_redirect_uri(strategy),

View file

@ -13,7 +13,7 @@ defmodule AshAuthentication.Strategy.OAuth2.Verifier do
:ok <- validate_secret(strategy, :client_id),
:ok <- validate_secret(strategy, :client_secret),
:ok <- validate_secret(strategy, :redirect_uri),
:ok <- validate_secret(strategy, :site),
:ok <- validate_secret(strategy, :base_url),
:ok <- validate_secret(strategy, :token_url),
:ok <- validate_secret(strategy, :user_url) do
if strategy.auth_method == :private_key_jwt do

View file

@ -13,7 +13,7 @@ defmodule AshAuthentication.Strategy.Oidc.Verifier do
:ok <- validate_secret(strategy, :client_id),
:ok <- validate_secret(strategy, :client_secret),
:ok <- validate_secret(strategy, :redirect_uri),
:ok <- validate_secret(strategy, :site),
:ok <- validate_secret(strategy, :base_url),
:ok <- validate_secret(strategy, :token_url),
:ok <- validate_secret(strategy, :user_url, [nil]),
:ok <- validate_secret(strategy, :nonce, [true, false]) do

View file

@ -217,7 +217,7 @@ defmodule AshAuthentication.MixProject do
defp deps do
[
{:ash, ash_version("~> 2.5 and >= 2.5.11")},
{:assent, "~> 0.2"},
{:assent, "~> 0.2 and >= 0.2.8"},
{:bcrypt_elixir, "~> 3.0"},
{:castore, "~> 1.0"},
{:finch, "~> 0.16.0"},

View file

@ -5,7 +5,7 @@
"ash_graphql": {:hex, :ash_graphql, "0.26.6", "38a2a85cc58d31cce576e601e6d6932ae329a80f11b4184d083d391b7523ab03", [:mix], [{:absinthe, "~> 1.7", [hex: :absinthe, repo: "hexpm", optional: false]}, {:absinthe_plug, "~> 1.4", [hex: :absinthe_plug, repo: "hexpm", optional: false]}, {:ash, "~> 2.14 and >= 2.14.17", [hex: :ash, repo: "hexpm", optional: false]}, {:jason, "~> 1.2", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "e16e5c28cc050a8ef9c9fc5e50c3d14b7b670d9c42ed6e4449c6844ee9325ed0"},
"ash_json_api": {:hex, :ash_json_api, "0.34.0", "f11b21c322cead92d0a886c2f9640a35c5866e5024c4744ad1869996aeb3b123", [:mix], [{:ash, "~> 2.3 and >= 2.9.24", [hex: :ash, repo: "hexpm", optional: false]}, {:jason, "~> 1.1", [hex: :jason, repo: "hexpm", optional: false]}, {:json_xema, "~> 0.4.0", [hex: :json_xema, repo: "hexpm", optional: false]}, {:open_api_spex, "~> 3.16", [hex: :open_api_spex, repo: "hexpm", optional: true]}, {:plug, "~> 1.11", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "192d805447e2ed506751a2ae6f58f564741f68a9e8cba1a71a2f6f3928e182f1"},
"ash_postgres": {:hex, :ash_postgres, "1.3.62", "e8b661a0a88a771f7139dcd7c9632cc140f9b05c278cc0ee297638cb47782c1f", [:mix], [{:ash, "~> 2.17 and >= 2.17.3", [hex: :ash, repo: "hexpm", optional: false]}, {:ecto, "~> 3.9", [hex: :ecto, repo: "hexpm", optional: false]}, {:ecto_sql, "~> 3.9", [hex: :ecto_sql, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}, {:postgrex, ">= 0.0.0", [hex: :postgrex, repo: "hexpm", optional: false]}], "hexpm", "99e5702f72ec54d65a2571bebb89e3867ca7220eeca7c89aa7935dcf6e0cc0a7"},
"assent": {:hex, :assent, "0.2.7", "aa68f68e577077c091ce722bff8fe1ae56b95b274bb8107f7a5406cc15a65da7", [:mix], [{:certifi, ">= 0.0.0", [hex: :certifi, repo: "hexpm", optional: true]}, {:finch, "~> 0.15", [hex: :finch, repo: "hexpm", optional: true]}, {:jose, "~> 1.8", [hex: :jose, repo: "hexpm", optional: true]}, {:mint, "~> 1.0", [hex: :mint, repo: "hexpm", optional: true]}, {:ssl_verify_fun, ">= 0.0.0", [hex: :ssl_verify_fun, repo: "hexpm", optional: true]}], "hexpm", "08106af439de4f9de114c0334de4c848de7cfbe53a5a52d342a784c4f6bc86f3"},
"assent": {:hex, :assent, "0.2.8", "72abd81d182e2a2902c74d926eb1b0c186756299f4393a6844ea4757407731e6", [:mix], [{:certifi, ">= 0.0.0", [hex: :certifi, repo: "hexpm", optional: true]}, {:finch, "~> 0.15", [hex: :finch, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:jose, "~> 1.8", [hex: :jose, repo: "hexpm", optional: true]}, {:mint, "~> 1.0", [hex: :mint, repo: "hexpm", optional: true]}, {:req, "~> 0.4", [hex: :req, repo: "hexpm", optional: true]}, {:ssl_verify_fun, ">= 0.0.0", [hex: :ssl_verify_fun, repo: "hexpm", optional: true]}], "hexpm", "9f977d0358402a6c8807f10faa9876f997186447e1b353d191248007eb45acfe"},
"bcrypt_elixir": {:hex, :bcrypt_elixir, "3.1.0", "0b110a9a6c619b19a7f73fa3004aa11d6e719a67e672d1633dc36b6b2290a0f7", [:make, :mix], [{:comeonin, "~> 5.3", [hex: :comeonin, repo: "hexpm", optional: false]}, {:elixir_make, "~> 0.6", [hex: :elixir_make, repo: "hexpm", optional: false]}], "hexpm", "2ad2acb5a8bc049e8d5aa267802631912bb80d5f4110a178ae7999e69dca1bf7"},
"bunt": {:hex, :bunt, "0.2.1", "e2d4792f7bc0ced7583ab54922808919518d0e57ee162901a16a1b6664ef3b14", [:mix], [], "hexpm", "a330bfb4245239787b15005e66ae6845c9cd524a288f0d141c148b02603777a5"},
"castore": {:hex, :castore, "1.0.4", "ff4d0fb2e6411c0479b1d965a814ea6d00e51eb2f58697446e9c41a97d940b28", [:mix], [], "hexpm", "9418c1b8144e11656f0be99943db4caf04612e3eaecefb5dae9a2a87565584f8"},

View file

@ -194,7 +194,7 @@ defmodule Example.User do
client_id &get_config/2
redirect_uri &get_config/2
client_secret &get_config/2
site &get_config/2
base_url &get_config/2
authorize_url &get_config/2
token_url &get_config/2
user_url &get_config/2
@ -207,7 +207,7 @@ defmodule Example.User do
client_id &get_config/2
redirect_uri &get_config/2
client_secret &get_config/2
site &get_config/2
base_url &get_config/2
authorize_url &get_config/2
token_url &get_config/2
user_url &get_config/2
@ -220,7 +220,7 @@ defmodule Example.User do
client_id &get_config/2
redirect_uri &get_config/2
client_secret &get_config/2
site &get_config/2
base_url &get_config/2
authorize_url &get_config/2
token_url &get_config/2
user_url &get_config/2
@ -249,7 +249,7 @@ defmodule Example.User do
client_id &get_config/2
client_secret &get_config/2
redirect_uri &get_config/2
site &get_config/2
base_url &get_config/2
token_url &get_config/2
end
end