diff options
author | gennyble <gen@nyble.dev> | 2025-06-16 18:59:11 -0500 |
---|---|---|
committer | gennyble <gen@nyble.dev> | 2025-06-16 18:59:11 -0500 |
commit | 675b0dfc572dcfc17b92da466235b2519ffceecd (patch) | |
tree | 949a8eff0bb18ecc047010930ba8abb460b23e80 /README.md | |
parent | 2602759ef92a840e2723e1795c6c4677a2d11ab4 (diff) | |
download | piper-675b0dfc572dcfc17b92da466235b2519ffceecd.tar.gz piper-675b0dfc572dcfc17b92da466235b2519ffceecd.zip |
add details about auth system to readme
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/README.md b/README.md index ab02277..5435278 100644 --- a/README.md +++ b/README.md @@ -6,4 +6,28 @@ to facilitate easy use in a dynamic dns kinda situation. "it's a thing that tells you your IP" -> "gets your IP?" -> "IPer" --> "piper!" \ No newline at end of file +-> "piper!" + +send an `Authorization` header with your request to track changes in your IP +address. The value you provide can only contain Base-64 characters, but does +not have to be valid Base-64. + +If a request is received with an `Authorization` header, piper will compare the +IP the request came from with the last IP to use that `Authorization` value. +There are three possible situations and two responses: + +A `200` status code will be returned, with an IP in the body, if: +- A request has never been made with the provided auth value +- The last request to use the auth value came from a different IP address + +A `302` status code will be returned, with no body, if: +- The last request to use the auth value comes from the same IP address + +You may specify a `Content-Type` of `application/json` or `text/plain`. Example +responses are below: + +**`application/json`** +`{"ip": "127.0.0.1"}` + +**`text/plain`** +`127.0.0.1` \ No newline at end of file |