Skip to content

Commit 0189e27

Browse files
committed
Updated Readme: Added Spotify. Removed chapter for mapping of user data
1 parent e3a1f56 commit 0189e27

File tree

1 file changed

+28
-22
lines changed

1 file changed

+28
-22
lines changed

README.md

Lines changed: 28 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ This README file contains the following main sections:
1919
+ [Github](#github)
2020
+ [Google](#google)
2121
+ [Joomla](#joomla)
22+
+ [Spotify](#spotify)
2223
+ [WordPress](#wordpress)
2324
+ [Trouble Shooting](#trouble-shooting)
24-
+ [Mapping of the User Data to webtrees](#mapping-of-the-user-data-to-webtrees)
2525
+ [Concept](#concept)
2626
+ [Definitons](#definitions)
2727
+ [Protocol Flow](#protocol-flow)
@@ -63,6 +63,7 @@ Currently, the following authorization providers are supported:
6363
+ **Github**
6464
+ **Google**
6565
+ **Joomla** (with a specific authorization provider extension installed in Joomla)
66+
+ **Spotify**
6667
+ **WordPress** (with a specific authorization provider plugin installed in WordPress)
6768

6869
To use further authorization providers, the following approaches are available:
@@ -238,6 +239,25 @@ Joomla_signInButtonLabel='xxx'
238239
+ **Joomla_urlAuthorize**='JOOMLA_BASE_URL/index.php' (JOOMLA_BASE_URL from your Joomla installation, e.g. 'https://mysite.net/joomla')
239240
+ **Joomla_signInButtonLabel**='...' (the label, which shall be shown for the sign in button etc.)
240241

242+
### Spotify
243+
+ Open the [Spotify](https://open.spotify.com/login) page and log into your Dropbox account
244+
+ Open the [Create apps page]( https://developer.spotify.com/dashboard/create)
245+
+ Insert an "App name" and an "App description"
246+
+ Insert a "Website", e.g. the URL of your website
247+
+ Insert the "Redirect URIs". See chapter [General Configuration](#general-configuration) about how to get the redirect URL from the webtrees custom module settings.
248+
+ Press "Add" button to add the redirect URI.
249+
+ Select the checkbox for "Web API"
250+
+ Agree to the terms of service
251+
+ Press "Save" button
252+
+ Open your webtrees config.ini.php file and add the following lines (copy/paste to the end):
253+
```PHP
254+
Spotify_clientId='xxx'
255+
Spotify_clientSecret='xxx'
256+
```
257+
+ Insert the configuration details from your Spotify app into the newly included configuration lines of your config.ini.php file:
258+
+ **Spotify_clientId**='...' (value shown in Spotify, like described above)
259+
+ **Spotify_clientSecret**='...' (value shown in Spotify, like described above)
260+
241261
### WordPress
242262
+ Download the WordPress plugin [WP OAuth Server](https://wordpress.org/plugins/miniorange-oauth-20-server/)
243263
+ Install the plugin in the WordPress administration backend
@@ -290,23 +310,6 @@ Although OAuth 2 is a standard protocol and is used on lots of websites, the aut
290310
+ Check the server configuration for any redirects from sub-domains, e.g. https://www.my_site.net to https://my_site.net
291311
+ If using the WordPress authorization provider, check the [PHP/Apache configuration](#phpapache-configuration)
292312

293-
## Mapping of the User Data to webtrees
294-
The user data (i.e. user name, real name, email address), which is received with the OAuth 2.0 protocol from the authorization provider, is mapped to a webtrees user. Since there might be differences regarding availablility and changability of the user data, the following mapping is used:
295-
+ **primary**: The primary key of the user data within the authorization provider. The primary key **cannot be changed** within webtrees and usually also cannot be changed within the authorization provider. If the primary key within the authorization provider is changed by any means, this will result in loosing the link of the user data between webtrees and the authorization provider.
296-
+ **mandatory**: A mandatory part of the user data, which can only be changed within the authorization provider and is not allowed to be changed within webtrees. Mandatory parts of the user data **are updated** in webtrees if changed within the authorization provider.
297-
+ **optional**: An optional part of the user data, which can be changed within webtrees. Optional user data will not be updated/synchronized between the authorization provider and webtrees.
298-
299-
The following table shows the mapping of the user data for the different authorization providers:
300-
301-
|Authorization provider|user name|real name|email address|
302-
|:---------------------|:--------|:--------|:------------|
303-
|Generic|mandatory|optional|**primary**|
304-
|Dropbox|**primary**|optional|mandatory|
305-
|Github|**primary**|optional|mandatory|
306-
|Google|optional|optional|**primary**|
307-
|Joomla|**primary**|optional|mandatory|
308-
|WordPress|**primary**|optional|mandatory|
309-
310313
## Definitions
311314
[RFC 6749](https://datatracker.ietf.org/doc/html/rfc6749) defines several roles, which are used in OAuth. In the context of the OAuth 2.0 Client and webtrees single sign on, the OAuth [roles](https://datatracker.ietf.org/doc/html/rfc6749#section-1.1) and definitions are used as follows:
312315
+ **Resource Owner**: The webtrees user.
@@ -335,7 +338,7 @@ The following figure shows how the protocol flow of [RFC 6749](https://datatrack
335338
![Protocol Flow](resources/img/protocol_flow.jpg)
336339

337340
## Webtrees Version
338-
The module was developed and tested with [webtrees 2.1.21 and 2.2.0](https://webtrees.net/download), but should also run with any other 2.1/2.2 versions.
341+
The module was developed and tested with [webtrees 2.1.21 and 2.2.1](https://webtrees.net/download), but should also run with any other 2.1/2.2 versions.
339342

340343
## Translation
341344
You can help to translate this module. The translation is based on [gettext](https://en.wikipedia.org/wiki/Gettext) and uses .po files, which can be found in [/resources/lang/](resources/lang/). You can use a local editor like [Poedit](https://poedit.net/) or notepad++ to work on translations and provide them in the [Github repository](https://github.com/Jefferson49/webtrees-oauth2-client) of the module. You can do this via a pull request (if you know how to do), or by opening a new issue and attaching a .po file. Updated translations will be included in the next release of this module.
@@ -359,19 +362,22 @@ You should have received a copy of the GNU General Public License along with thi
359362
## Contributions and Copyrights
360363
+ webtrees
361364
+ [webtrees](https://webtrees.net): online genealogy
362-
+ Copyright (c) 2024 [webtrees development team](http://webtrees.net)
365+
+ Copyright (c) 2025 [webtrees development team](http://webtrees.net)
363366
+ League
364367
+ [oauth2-client](https://github.com/thephpleague/oauth2-client)
365368
+ Copyright (c) 2013-2023 Alex Bilbie
366369
+ [oauth2-github](https://github.com/thephpleague/oauth2-github)
367370
+ Copyright (c) 2015 Steven Maguire
368371
+ [oauth2-google](https://github.com/thephpleague/oauth2-google)
369372
+ Copyright (c) 2015 Woody Gilk
373+
+ stevenmaguire
374+
+ [oauth2-dropbox](https://github.com/stevenmaguire/oauth2-dropbox)
375+
+ Copyright (c) 2015-2021 Steven Maguire
370376
+ Vesta Common (webtrees custom module)
371377
+ [Cissee\WebtreesExt\More18N](https://github.com/vesta-webtrees-2-custom-modules/vesta_common/blob/master/patchedWebtrees/MoreI18N.php)
372-
+ Copyright (c) 2019 – 2024 Richard Cissée
378+
+ Copyright (c) 2019 – 2025 Richard Cissée
373379
+ OAuth2Client (webtrees custom module)
374-
+ Copyright (c) 2024 [Jefferson49](https://github.com/Jefferson49)
380+
+ Copyright (c) 2025 [Jefferson49](https://github.com/Jefferson49)
375381

376382
## Github Repository
377383
https://github.com/Jefferson49/webtrees-oauth2-client

0 commit comments

Comments
 (0)