oauth/oidc
This commit is contained in:
22
priv/oauth/create_client.exs
Normal file
22
priv/oauth/create_client.exs
Normal 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
|
||||
Reference in New Issue
Block a user