oauth/oidc

This commit is contained in:
bluepython508
2023-11-07 19:35:03 +00:00
parent a0fc306df1
commit 54db8727b0
20 changed files with 670 additions and 3 deletions

View File

@@ -0,0 +1,22 @@
id = SecureRandom.uuid()
secret = SecureRandom.hex(64)
[name, redirect] = System.argv()
Boruta.Ecto.Admin.create_client(%{
id: id, # OAuth client_id
secret: secret, # OAuth client_secret
name: name, # Display name
redirect_uris: [redirect], # OAuth client redirect_uris
pkce: false, # PKCE enabled
public_refresh_token: true, # do not require client_secret for refreshing tokens
public_revoke: false, # do not require client_secret for revoking tokens
confidential: false, # see OAuth 2.0 confidentiality (requires client secret for some flows)
token_endpoint_auth_methods: [ # activable client authentication methods
"client_secret_basic",
"client_secret_post",
"client_secret_jwt",
"private_key_jwt"
],
}) |> IO.inspect