Skip to content

Commit c50f0c9

Browse files
joemullStephDriver
authored andcommitted
Copyedits for clarity
1 parent 8ce1c68 commit c50f0c9

File tree

1 file changed

+53
-25
lines changed

1 file changed

+53
-25
lines changed

docs/md/orcid.md

Lines changed: 53 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -10,49 +10,77 @@ It can be set up in a few steps.
1010

1111
2. Enter each production domain for your Janeway instance as a redirect URL on orcid.org. If Janeway is set to domain mode, each journal will need its own redirect URI.
1212

13-
3. Enable ORCID and copy the keys from your client into the Django settings file (`src/core/settings.py`).
13+
3. Enable ORCID and copy the keys from your client into the Django settings file (`src/core/settings.py`). Replace _`CLIENT_SECRET`_ and _`CLIENT_ID`_ with the values from orcid.org.
1414

15-
```py
16-
ENABLE_ORCID = True
17-
ORCID_CLIENT_SECRET = "your client secret"
18-
ORCID_CLIENT_ID = "your client ID"
19-
```
15+
```py
16+
ENABLE_ORCID = True
17+
ORCID_CLIENT_SECRET = "CLIENT_SECRET"
18+
ORCID_CLIENT_ID = "CLIENT_ID"
19+
```
2020

21-
Note that the URLs for the ORCID API are fixed, so you can leave the defaults in `src/core/janeway_global_settings.py`.
21+
Note that the URLs for the ORCID API are fixed, so you can leave the defaults in `src/core/janeway_global_settings.py`.
2222

2323
## Testing ORCID login manually
2424

2525
You can test the ORCID login flow locally, by creating a test client, adjusting your hosts file, and resetting the Janeway domain for the site you want to test.
2626

2727
The following steps were written for Ubuntu, and are meant for testing the press site.
2828

29-
1. Create a test client on orcid.org and enter a normal domain of your choosing (it won’t be accessed) with `http` and the Janeway port you use for development: `http://www.openlibhums.org:8000/`
29+
1. Create a test client on orcid.org and enter a normal domain of your choosing (it won’t be accessed), with `http` and the Janeway port you use for development. An example is `http://www.openlibhums.org:8000/`.
3030

3131
2. Edit your hosts file to put in the domain from the redirect URI that orcid.org knows about, in place of the `localhost` domain:
3232

33-
```sh
34-
sudo vim /etc/hosts
35-
```
33+
```sh
34+
sudo vim /etc/hosts
35+
```
3636

37-
```
38-
127.0.0.1 www.openlibhums.org
39-
```
37+
```
38+
127.0.0.1 DOMAIN
39+
```
4040

41-
This will let orcid.org redirect your browser to the domain it knows about when authentication is finished, while allowing your browser to load the normal Janeway development server.
41+
An example:
42+
43+
```
44+
127.0.0.1 www.openlibhums.org
45+
```
46+
47+
This will let orcid.org redirect your browser to the domain it knows about when authentication is finished, while allowing your browser to load the normal Janeway development server.
4248

4349
3. Restart the networking service for the change to take effect.
4450

45-
```
46-
sudo systemctl restart NetworkManager
47-
```
51+
```sh
52+
sudo systemctl restart NetworkManager
53+
```
4854

4955
4. Edit your Janeway site domain to the same domain, keeping the port number.
5056

51-
```
52-
python src/manage.py alter_domains press
53-
Altering domain for Test A, current domain: localhost:8000
54-
Enter the new domain you wish to set: www.openlibhums.org:8000
55-
Altering domain record...... [Ok]
56-
```
57+
```sh
58+
python src/manage.py alter_domains press
59+
```
60+
61+
It will prompt you to enter a domain.
62+
63+
```
64+
Altering domain for PRESS_NAME, current domain: localhost
65+
Enter the new domain you wish to set:
66+
```
67+
68+
Enter the domain and port.
69+
70+
```
71+
Enter the new domain you wish to set: DOMAIN:PORT
72+
```
73+
74+
An example:
75+
76+
```
77+
Enter the new domain you wish to set: www.openlibhums.org:8000
78+
```
79+
80+
If it was successful, you will see this:
81+
82+
```
83+
Altering domain record...... [Ok]
84+
```
5785

58-
5. Load the site at the new domain with `http` and the correct port (`http://www.openlibhums.org:8000/`) and test away.
86+
5. Load the site at the new domain with `http` and the correct port (e.g. `http://www.openlibhums.org:8000/`) and test away.

0 commit comments

Comments
 (0)