Auth

Authentication related resolvers for Maple Finance

get
Get Auth Challenge

https://api.maple.finance/auth/:address
The message (x-auth-message) is obtained here, which can be then used for signing (x-auth-signature)
Request
Response
Request
Path Parameters
address
required
string
The Ethereum address that has been used to sign on your wallet (MetaMask/WalletConnect)
Response
200: OK
A valid cryptic message is sent.
{
"data": {
"challenge": [
{ "value": "Maple Finance Authentication" },
{ "value": "<challenge bound with cipher content"> }
]
}
}
403: Forbidden
If address is badly formatted or invalid.
{ "message": "BAD_ADDRESS" }

get
Check Signature

https://api.maple.finance/signature/check
Checks for valid signature, ensuring authentication.
Request
Response
Request
Headers
x-auth-signature
required
string
The cryptographic signature, which is received from either MetaMask or any other signing Ethereum wallet.
x-auth-message
required
string
The message received from the above endpoint
Response
200: OK
The message and signature match and the right user address is sent
{
"owner": "0x3489Dee7e8Fcec81F15e1C00209781779C5AAFF1"
}
403: Forbidden
If address is badly formatted or invalid, or if signature invalid
{ "message": "BAD_ADDRESS" / "BAD_SIGNATURE" }