You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/md/orcid.md
+53-25Lines changed: 53 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,49 +10,77 @@ It can be set up in a few steps.
10
10
11
11
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.
12
12
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.
14
14
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
+
```
20
20
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 ORCIDAPI are fixed, so you can leave the defaults in`src/core/janeway_global_settings.py`.
22
22
23
23
## Testing ORCID login manually
24
24
25
25
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.
26
26
27
27
The following steps were written for Ubuntu, and are meant for testing the press site.
28
28
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/`.
30
30
31
31
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:
32
32
33
-
```sh
34
-
sudo vim /etc/hosts
35
-
```
33
+
```sh
34
+
sudo vim /etc/hosts
35
+
```
36
36
37
-
```
38
-
127.0.0.1 www.openlibhums.org
39
-
```
37
+
```
38
+
127.0.0.1 DOMAIN
39
+
```
40
40
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.
42
48
43
49
3. Restart the networking service for the change to take effect.
44
50
45
-
```
46
-
sudo systemctl restart NetworkManager
47
-
```
51
+
```sh
52
+
sudo systemctl restart NetworkManager
53
+
```
48
54
49
55
4. Edit your Janeway site domain to the same domain, keeping the port number.
50
56
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 forPRESS_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
+
```
57
85
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