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: README.md
+92-89Lines changed: 92 additions & 89 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,37 +29,37 @@
29
29
30
30
**The use of this software subjects you to our [Terms Of Use][4] and [Data Protection Policy][5].**
31
31
32
-
# version [1.5.2][6]
32
+
# version [1.5.3][6]
33
33
34
34
## Introduction:
35
35
36
36
**OAuth2OOo** is part of a [Suite][7] of [LibreOffice][8]~~and/or [OpenOffice][9]~~ extensions allowing to offer you innovative services in these office suites.
37
37
38
38
This extension is the implementation of the [OAuth 2.0 protocol][10]. Protocol allowing you to obtain your consent so that an application can access your data present at the GAFA.
39
39
40
-
It allows **executing HTTP requests in BASIC** and provides the following macros as an example:
41
-
-[HTTPGetRequest][11]
42
-
-[HTTPPostRequest][12]
43
-
-[ChatGPTRequest][13]
44
-
-[GoogleAPIRequest][14]
45
-
-[GraphAPIRequest][15]
46
-
-[GithubDownloadRequest][16]
40
+
It allows **executing HTTP requests** in [BASIC][11] and provides the following macros as an example:
41
+
-[HTTPGetRequest][12]
42
+
-[HTTPPostRequest][13]
43
+
-[ChatGPTRequest][14]
44
+
-[GoogleAPIRequest][15]
45
+
-[GraphAPIRequest][16]
46
+
-[GithubDownloadRequest][17]
47
47
48
48
If you open a document beforehand, you can launch them by:
49
49
**Tools -> Macros -> Run Macro... -> My Macros -> OAuth2OOo -> `macro-name` -> Main -> Run**
50
50
51
51
It also allows **grabbing internet data in a Calc sheet**. See the following Calc files as an example:
52
-
-[LDLC MacBook Pro.ods][17]
53
-
-[LDLC Asus Zenbook.ods][18]
52
+
-[LDLC MacBook Pro.ods][18]
53
+
-[LDLC Asus Zenbook.ods][19]
54
54
55
-
And finally, it allows you to **drive Firefox using a Calc file** (or any other browser supported by [Selenium][19]). See the following files:
56
-
-[Page Jaunes (Windows).ods][20]
57
-
-[Page Jaunes (Linux).ods][21]
55
+
And finally, it allows you to **drive Firefox using a Calc file** (or any other browser supported by [Selenium][20]). See the following files:
56
+
-[Page Jaunes (Windows).ods][21]
57
+
-[Page Jaunes (Linux).ods][22]
58
58
59
59
Being free software I encourage you:
60
-
- To duplicate its [source code][22].
60
+
- To duplicate its [source code][23].
61
61
- To make changes, corrections, improvements.
62
-
- To open [issue][23] if needed.
62
+
- To open [issue][24] if needed.
63
63
64
64
In short, to participate in the development of this extension.
65
65
Because it is together that we can make Free Software smarter.
@@ -70,13 +70,13 @@ ___
70
70
71
71
The minimum version of LibreOffice supported by the OAuth2OOo extension depends on how you installed LibreOffice on your computer:
72
72
73
-
-**Regardless of platform**, if you installed LibreOffice from the [LibreOffice download site][24], **the minimum version of LibreOffice is 7.0**.
73
+
-**Regardless of platform**, if you installed LibreOffice from the [LibreOffice download site][25], **the minimum version of LibreOffice is 7.0**.
74
74
75
75
-**On Linux**, if you used the package manager to install LibreOffice, **the minimum version of LibreOffice is 6.0**. However, you must ensure that the system-provided Python version is not lower than 3.8.
76
76
In addition, your system-provided Python packages can be out of date. The extension's logging will allow you to check if this is the case. It is accessible via the menu: **Tools -> Options -> Internet -> OAuth2 protocol -> View log -> System Info** and requires restarting LibreOffice after activation.
77
77
If outdated packages appear, you can update them with this procedure:
78
-
- Download the file [requirements.txt][25].
79
-
- Install using [pip][26], the Python packages necessary for the extension with the command:
78
+
- Download the file [requirements.txt][26].
79
+
- Install using [pip][27], the Python packages necessary for the extension with the command:
80
80
`pip install requirements.txt`
81
81
82
82
If you want to **drive Firefox in Calc on Ubuntu** then you need to reinstall Firefox from the Mozilla PPA.
@@ -90,7 +90,7 @@ ___
90
90
It seems important that the file was not renamed when it was downloaded.
### Use the UNO OAuth2Service to perform HTTP requests:
117
122
118
-
The return value: `initialized` is True if `user_account` is already authorized for `registered_url`.
123
+
You now have an `oRequest` object that responds to the interface defined in the [XOAuth2Service.idl][31] file.
124
+
With this interface, two methods are required to execute an HTTP request:
125
+
-`getRequestParameter([in] string Name)`, which allows you to obtain an object responding to the [XRequestParameter.idl][32] interface. This interface allows you to configure the HTTP request before execution.
126
+
-`execute([in] com::sun::star::rest::XRequestParameter Parameter)`, which allows you to obtain an object responding to the [XRequestResponse.idl][33] interface. This allows you to achieve almost anything possible with an HTTP response.
The return value: `initialized` is True if `registered_url` was successfully found in the OAuth2 service configuration.
125
-
126
-
### Get the access token:
127
-
128
-
> format = 'Bearer %s'
129
-
> token = service.getToken(format)
128
+
To go further, I advise you to take a look at the macros that are delivered with the extension and which implement all types of HTTP requests.
130
129
131
130
___
132
131
133
132
## Uno OAuth2.0 API for LibreOffice.
134
133
135
-
![OAuth2OOo Wizard Page1 screenshot][30]
134
+
![OAuth2OOo Wizard Page1 screenshot][34]
136
135
137
-
![OAuth2OOo Wizard Page2 screenshot][31]
136
+
![OAuth2OOo Wizard Page2 screenshot][35]
138
137
139
-
![OAuth2OOo Wizard Page3 screenshot][32]
138
+
![OAuth2OOo Wizard Page3 screenshot][36]
140
139
141
-
![OAuth2OOo Browser Page1 screenshot][33]
140
+
![OAuth2OOo Browser Page1 screenshot][37]
142
141
143
-
![OAuth2OOo Browser Page2 screenshot][34]
142
+
![OAuth2OOo Browser Page2 screenshot][38]
144
143
145
-
![OAuth2OOo Browser Page3 screenshot][35]
144
+
![OAuth2OOo Browser Page3 screenshot][39]
146
145
147
-
![OAuth2OOo Browser Page4 screenshot][36]
146
+
![OAuth2OOo Browser Page4 screenshot][40]
148
147
149
-
![OAuth2OOo Wizard Page4 screenshot][37]
148
+
![OAuth2OOo Wizard Page4 screenshot][41]
150
149
151
150
The OAuth2 protocol allows access to server resources, after accepting the connection authorization, by exchanging tokens.
152
151
@@ -158,12 +157,12 @@ ___
158
157
159
158
## How to build the extension:
160
159
161
-
Normally, the extension is created with Eclipse for Java and [LOEclipse][38]. To work around Eclipse, I modified LOEclipse to allow the extension to be created with Apache Ant.
160
+
Normally, the extension is created with Eclipse for Java and [LOEclipse][42]. To work around Eclipse, I modified LOEclipse to allow the extension to be created with Apache Ant.
162
161
To create the OAuth2OOo extension with the help of Apache Ant, you need to:
163
-
- Install the [Java SDK][39] version 17 or higher.
164
-
- Install [Apache Ant][40] version 1.10.0 or higher.
165
-
- Install [LibreOffice and its SDK][41] version 7.x or higher.
166
-
- Clone the [OAuth2OOo][42] repository on GitHub into a folder.
162
+
- Install the [Java SDK][43] version 17 or higher.
163
+
- Install [Apache Ant][44] version 1.10.0 or higher.
164
+
- Install [LibreOffice and its SDK][45] version 7.x or higher.
165
+
- Clone the [OAuth2OOo][46] repository on GitHub into a folder.
167
166
- From this folder, move to the directory: `source/OAuth2OOo/`
168
167
- In this directory, edit the file: `build.properties` so that the `office.install.dir` and `sdk.dir` properties point to the folders where LibreOffice and its SDK were installed, respectively.
169
168
- Start the archive creation process using the command: `ant`
@@ -181,59 +180,63 @@ ___
181
180
182
181
* LibreOffice 24.8.0.3 (x86_64) - Windows 10(x64) - Python version 3.9.19 (under Lubuntu 22.04 / VirtualBox 6.1.38)
183
182
184
-
***Does not work with OpenOffice** see [bug 128569][43]. Having no solution, I encourage you to install **LibreOffice**.
183
+
***Does not work with OpenOffice** see [bug 128569][47]. Having no solution, I encourage you to install **LibreOffice**.
185
184
186
185
I encourage you in case of problem :confused:
187
-
to create an [issue][23]
186
+
to create an [issue][24]
188
187
I will try to solve it :smile:
189
188
190
189
___
191
190
192
191
## Historical:
193
192
194
-
### [All changes are logged in the version History][44]
193
+
### [All changes are logged in the version History][48]
0 commit comments