Change default login message and update config example
Consider "ethereum" auth flow deprecated.
This commit is contained in:
parent
a39b229325
commit
a1af46f566
4 changed files with 12 additions and 10 deletions
|
@ -4,19 +4,22 @@ storage_dir: files
|
|||
http_host: '127.0.0.1'
|
||||
http_port: 8380
|
||||
|
||||
# domain name
|
||||
# Domain name
|
||||
instance_uri: myserver.net
|
||||
instance_title: myserver
|
||||
instance_short_description: my fedi instance
|
||||
# Long description can contain markdown syntax
|
||||
instance_description: my fedi instance
|
||||
|
||||
# RSA private key can be generated with `mitractl generate-rsa-key`
|
||||
instance_rsa_key: null
|
||||
registrations_open: false
|
||||
# Login message must contain instance URL
|
||||
login_message: 'Sign this message to log in to https://myserver.net. Do not sign this message on other sites!'
|
||||
# EIP-4361 login message
|
||||
login_message: 'Do not sign this message on other sites!'
|
||||
post_character_limit: 2000
|
||||
|
||||
# To disable blockchain integration, set `blockchain` to `null`
|
||||
# Blockchain settings
|
||||
# Set `blockchain` key to `null` to disable blockchain integration
|
||||
blockchain:
|
||||
# CAIP-2 chain ID (https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-2.md)
|
||||
chain_id: eip155:31337
|
||||
|
@ -28,6 +31,8 @@ blockchain:
|
|||
# Instance private key
|
||||
signing_key: null
|
||||
|
||||
# IPFS settings
|
||||
# Set `ipfs_api_url` key to `null` to disable IPFS integration
|
||||
ipfs_api_url: 'http://127.0.0.1:5001'
|
||||
# IPFS gateway for clients
|
||||
ipfs_gateway_url: 'https://ipfs.io'
|
||||
|
|
|
@ -19,7 +19,6 @@ paths:
|
|||
type: string
|
||||
enum:
|
||||
- password
|
||||
- ethereum
|
||||
- eip4361
|
||||
example: eip4361
|
||||
username:
|
||||
|
@ -33,12 +32,8 @@ paths:
|
|||
description: EIP-4361 signature (required if grant type is "eip4361").
|
||||
type: string
|
||||
example: 0x905...
|
||||
wallet_address:
|
||||
description: Ethereum wallet address (required if grant type is "ethereum").
|
||||
type: string
|
||||
example: null
|
||||
password:
|
||||
description: Password (required if grant type is "password" or "ethereum").
|
||||
description: Password (required if grant type is "password").
|
||||
type: string
|
||||
example: null
|
||||
required:
|
||||
|
|
|
@ -120,6 +120,7 @@ pub struct Config {
|
|||
#[serde(default)]
|
||||
pub registrations_open: bool, // default is false
|
||||
|
||||
// EIP-4361 login message
|
||||
pub login_message: String,
|
||||
|
||||
#[serde(default = "default_post_character_limit")]
|
||||
|
|
|
@ -33,6 +33,7 @@ async fn token_view(
|
|||
get_user_by_name(db_client, username).await?
|
||||
},
|
||||
"ethereum" => {
|
||||
// DEPRECATED
|
||||
let wallet_address = request_data.wallet_address.as_ref()
|
||||
.ok_or(ValidationError("wallet address is required"))?;
|
||||
validate_wallet_address(wallet_address)?;
|
||||
|
|
Loading…
Reference in a new issue