diff --git a/config.yaml.example b/config.yaml.example index 1467ea9..8dc8ec0 100644 --- a/config.yaml.example +++ b/config.yaml.example @@ -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' diff --git a/docs/openapi.yaml b/docs/openapi.yaml index bb60f47..2f64ad5 100644 --- a/docs/openapi.yaml +++ b/docs/openapi.yaml @@ -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: diff --git a/src/config.rs b/src/config.rs index c5a1e39..8acc48c 100644 --- a/src/config.rs +++ b/src/config.rs @@ -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")] diff --git a/src/mastodon_api/oauth/views.rs b/src/mastodon_api/oauth/views.rs index 34b2668..eb70726 100644 --- a/src/mastodon_api/oauth/views.rs +++ b/src/mastodon_api/oauth/views.rs @@ -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)?;