mirror of
https://github.com/joshp23/PEWS.git
synced 2024-12-30 14:20:20 +01:00
Installation updates
moved some options from pews.conf to .htaccess more options to example resource fixed logos, etc first run at readme
This commit is contained in:
parent
d6f4610bd9
commit
c5ab370e9b
7 changed files with 64 additions and 12 deletions
2
.well-known/webfinger/store/.htaccess
Normal file
2
.well-known/webfinger/store/.htaccess
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
order deny,allow
|
||||||
|
deny from all
|
|
@ -1,6 +1,19 @@
|
||||||
{
|
{
|
||||||
|
"PEWS":
|
||||||
|
{"class":"user","pass":"pewpewpassword"
|
||||||
|
},
|
||||||
"subject" : "acct:john@example.com",
|
"subject" : "acct:john@example.com",
|
||||||
"properties" : { "http://packetizer.com/ns/name" : "John Smith" },
|
"properties" :
|
||||||
|
{
|
||||||
|
"http://packetizer.com/ns/name" : "John Smith",
|
||||||
|
"http://blgx.example.net/ns/version" : "1.5.1",
|
||||||
|
"http://blgx.example.net/ns/ext" : null
|
||||||
|
},
|
||||||
|
"aliases" :
|
||||||
|
[
|
||||||
|
"https://social.example.com/u/john",
|
||||||
|
"https://mstdn.example.com/john"
|
||||||
|
],
|
||||||
"links" :
|
"links" :
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
|
@ -14,15 +27,21 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"rel" : "http://packetizer.com/rel/blog",
|
"rel" : "http://packetizer.com/rel/blog",
|
||||||
"href" : "http://blog.example.com/smithj"
|
"href" : "http://blog.example.com/smithj",
|
||||||
|
|
||||||
|
"titles" :
|
||||||
|
{
|
||||||
|
"en-us" : "The Adventures of John Smith",
|
||||||
|
"fr" : "Les Aventures de John Smith"
|
||||||
|
},
|
||||||
|
"properties" :
|
||||||
|
{
|
||||||
|
"http://example.com/role" : "author"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"rel" : "http://specs.openid.net/auth/2.0/provider",
|
"rel" : "http://specs.openid.net/auth/2.0/provider",
|
||||||
"href" : "https://profile.example.com/u/smithj"
|
"href" : "https://profile.example.com/u/smithj"
|
||||||
},
|
|
||||||
{
|
|
||||||
"rel" : "payment",
|
|
||||||
"href" : "https://www.paypal.me/JohnSmith"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
39
README.md
39
README.md
|
@ -1,2 +1,37 @@
|
||||||
# PEWS
|
![#PEWS (Pew! Pew!)](assets/logo.png)
|
||||||
PEWS (Pew! Pew!): PHP Easy WebFinger Server
|
---------------------------------------------------
|
||||||
|
#### PHP Easy WebFinger Server
|
||||||
|
|
||||||
|
## Features
|
||||||
|
### Server
|
||||||
|
* Fully spec compliant webfinger server
|
||||||
|
* Can accept json objects as requests
|
||||||
|
* Single or multiple domain use
|
||||||
|
### Server-Manager
|
||||||
|
* Robust API for adding and removing new hosts and resource accounts
|
||||||
|
* API for altering resource data (currently add or remove alias, WIP)
|
||||||
|
* Authoritative and secure
|
||||||
|
* Easy user management
|
||||||
|
## Quick Start
|
||||||
|
### For single domain use
|
||||||
|
1. Copy `.well-known/webfinger` into the root of your webserver.
|
||||||
|
2. Open `.well-known/webfinger/index.php` and set `PEWS_DOMAIN_STRICT` to `true`
|
||||||
|
3. Add a new host and account resource file to `./well-known/webfinger/store` folling the example provided and according to Webfinger [specs](https://tools.ietf.org/html/rfc7033).
|
||||||
|
### For multiple domain use
|
||||||
|
1. Copy this repo as `PEWS` to your host server, and make it readable by your webserver. ex: `/var/www/PEWS`
|
||||||
|
2. Add a new host and account resource file to `./well-known/webfinger/store` folling the example provided and according to Webfinger [specs](https://tools.ietf.org/html/rfc7033).
|
||||||
|
3. Copy `PEWS/assets/pews.conf` to `/etc/apache2/conf-available/pews.conf` and make any changes necessary.
|
||||||
|
4. In the terminal issue the command `a2enconf pews` and follow instructions.
|
||||||
|
### Both:
|
||||||
|
The `PEWS` section of a PEWS resource file is not a part of the general Webfinger spec, and is therefore not sent out in a general inquiry. This section is used for PEWS-manager authentication and authorization.
|
||||||
|
1. Set `class` to `user` or `admin`.
|
||||||
|
2. Set a new password. If set by hand, this password will be hashed when first checked. Alternatively, a user can send a `POST` request with the following parameters to set a new password:
|
||||||
|
* `updatePass:user@domain.com`
|
||||||
|
* `pass:pewpewpassword`
|
||||||
|
* `newPass:YourFancyNEwPassword`
|
||||||
|
If a user is `class:admin` then this user can alter the password of other users by adding `auth:admin-name@example.com` to the above post data, sending their own password as `pass:password`.
|
||||||
|
### TODO
|
||||||
|
1. Finish api for adding, removing, and editing resource `properites` and `links`
|
||||||
|
2. Add option to allow users to remove their own resource file
|
||||||
|
3. Additional storage options (sqlite, etc.)
|
||||||
|
4. Manager interface
|
||||||
|
|
BIN
assets/PEWS.png
Normal file
BIN
assets/PEWS.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.4 KiB |
Binary file not shown.
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 17 KiB |
BIN
assets/logo.png
BIN
assets/logo.png
Binary file not shown.
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 42 KiB |
|
@ -10,7 +10,3 @@ Alias /.well-known /var/www/PEWS/.well-known
|
||||||
Order allow,deny
|
Order allow,deny
|
||||||
Require all granted
|
Require all granted
|
||||||
</Directory>
|
</Directory>
|
||||||
<Directory /var/www/PEWS/.well-known/webfinger/store>
|
|
||||||
order deny,allow
|
|
||||||
deny from all
|
|
||||||
</Directory>
|
|
||||||
|
|
Loading…
Reference in a new issue