Skip to content

Commit 016b131

Browse files
committed
new version 1.5.3
1 parent 74442e7 commit 016b131

File tree

2 files changed

+185
-179
lines changed

2 files changed

+185
-179
lines changed

README.md

Lines changed: 92 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -29,37 +29,37 @@
2929

3030
**The use of this software subjects you to our [Terms Of Use][4] and [Data Protection Policy][5].**
3131

32-
# version [1.5.2][6]
32+
# version [1.5.3][6]
3333

3434
## Introduction:
3535

3636
**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.
3737

3838
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.
3939

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]
4747

4848
If you open a document beforehand, you can launch them by:
4949
**Tools -> Macros -> Run Macro... -> My Macros -> OAuth2OOo -> `macro-name` -> Main -> Run**
5050

5151
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]
5454

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]
5858

5959
Being free software I encourage you:
60-
- To duplicate its [source code][22].
60+
- To duplicate its [source code][23].
6161
- To make changes, corrections, improvements.
62-
- To open [issue][23] if needed.
62+
- To open [issue][24] if needed.
6363

6464
In short, to participate in the development of this extension.
6565
Because it is together that we can make Free Software smarter.
@@ -70,13 +70,13 @@ ___
7070

7171
The minimum version of LibreOffice supported by the OAuth2OOo extension depends on how you installed LibreOffice on your computer:
7272

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**.
7474

7575
- **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.
7676
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.
7777
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:
8080
`pip install requirements.txt`
8181

8282
If you want to **drive Firefox in Calc on Ubuntu** then you need to reinstall Firefox from the Mozilla PPA.
@@ -90,7 +90,7 @@ ___
9090
It seems important that the file was not renamed when it was downloaded.
9191
If necessary, rename it before installing it.
9292

93-
- ![OAuth2OOo logo][27] Install **[OAuth2OOo.oxt][28]** extension [![Version][29]][28]
93+
- ![OAuth2OOo logo][28] Install **[OAuth2OOo.oxt][29]** extension [![Version][30]][29]
9494

9595
Restart LibreOffice after installation.
9696
**Be careful, restarting LibreOffice may not be enough.**
@@ -101,52 +101,51 @@ ___
101101

102102
## Use:
103103

104-
This extension is not made to be used alone, but provide OAuth2 service to other LibreOffice ~~/ OpenOffice~~ extensions.
105-
Here's how we use its API:
104+
This extension was originally designed to provide [OAuth2][10] protocol support to other LibreOffice extensions.
105+
It also provides an API usable in [BASIC][11] to make HTTP requests:
106106

107-
### Create OAuth2 service:
107+
### Create the UNO OAuth2Service with the OAuth2 protocol support:
108108

109-
> identifier = "io.github.prrvchr.OAuth2OOo.OAuth2Service"
110-
> service = ctx.ServiceManager.createInstanceWithContext(identifier, ctx)
109+
```
110+
111+
sUrl = "people.googleapis.com"
112+
oRequest = createUnoServiceWithArguments("io.github.prrvchr.OAuth2OOo.OAuth2Service", Array(sUrl, sUser))
113+
```
111114

112-
### Initialize Session or at least Url:
115+
### Create the UNO OAuth2Service without the OAuth2 protocol support:
113116

114-
- Initialize Session:
117+
```
118+
oRequest = createUnoServiceWithArguments("io.github.prrvchr.OAuth2OOo.OAuth2Service")
119+
```
115120

116-
> initialized = service.initializeSession(registered_url, user_account)
121+
### Use the UNO OAuth2Service to perform HTTP requests:
117122

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.
119127

120-
- Initialize Url:
121-
122-
> initialized = service.initializeUrl(registered_url)
123-
124-
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.
130129

131130
___
132131

133132
## Uno OAuth2.0 API for LibreOffice.
134133

135-
![OAuth2OOo Wizard Page1 screenshot][30]
134+
![OAuth2OOo Wizard Page1 screenshot][34]
136135

137-
![OAuth2OOo Wizard Page2 screenshot][31]
136+
![OAuth2OOo Wizard Page2 screenshot][35]
138137

139-
![OAuth2OOo Wizard Page3 screenshot][32]
138+
![OAuth2OOo Wizard Page3 screenshot][36]
140139

141-
![OAuth2OOo Browser Page1 screenshot][33]
140+
![OAuth2OOo Browser Page1 screenshot][37]
142141

143-
![OAuth2OOo Browser Page2 screenshot][34]
142+
![OAuth2OOo Browser Page2 screenshot][38]
144143

145-
![OAuth2OOo Browser Page3 screenshot][35]
144+
![OAuth2OOo Browser Page3 screenshot][39]
146145

147-
![OAuth2OOo Browser Page4 screenshot][36]
146+
![OAuth2OOo Browser Page4 screenshot][40]
148147

149-
![OAuth2OOo Wizard Page4 screenshot][37]
148+
![OAuth2OOo Wizard Page4 screenshot][41]
150149

151150
The OAuth2 protocol allows access to server resources, after accepting the connection authorization, by exchanging tokens.
152151

@@ -158,12 +157,12 @@ ___
158157

159158
## How to build the extension:
160159

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.
162161
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.
167166
- From this folder, move to the directory: `source/OAuth2OOo/`
168167
- 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.
169168
- Start the archive creation process using the command: `ant`
@@ -181,59 +180,63 @@ ___
181180

182181
* LibreOffice 24.8.0.3 (x86_64) - Windows 10(x64) - Python version 3.9.19 (under Lubuntu 22.04 / VirtualBox 6.1.38)
183182

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**.
185184

186185
I encourage you in case of problem :confused:
187-
to create an [issue][23]
186+
to create an [issue][24]
188187
I will try to solve it :smile:
189188

190189
___
191190

192191
## Historical:
193192

194-
### [All changes are logged in the version History][44]
193+
### [All changes are logged in the version History][48]
195194

196195
[1]: </img/oauth2.svg#collapse>
197196
[2]: <https://prrvchr.github.io/OAuth2OOo/>
198197
[3]: <https://prrvchr.github.io/OAuth2OOo/README_fr>
199198
[4]: <https://prrvchr.github.io/OAuth2OOo/source/OAuth2OOo/registration/TermsOfUse_en>
200199
[5]: <https://prrvchr.github.io/OAuth2OOo/source/OAuth2OOo/registration/PrivacyPolicy_en>
201-
[6]: <https://prrvchr.github.io/OAuth2OOo/CHANGELOG#what-has-been-done-for-version-152>
200+
[6]: <https://prrvchr.github.io/OAuth2OOo/CHANGELOG#what-has-been-done-for-version-153>
202201
[7]: <https://prrvchr.github.io>
203202
[8]: <https://www.libreoffice.org/download/download/>
204203
[9]: <https://www.openoffice.org/download/index.html>
205204
[10]: <https://en.wikipedia.org/wiki/OAuth>
206-
[11]: <https://github.com/prrvchr/OAuth2OOo/blob/master/source/OAuth2OOo/OAuth2OOo/HTTPGetRequest.xba>
207-
[12]: <https://github.com/prrvchr/OAuth2OOo/blob/master/source/OAuth2OOo/OAuth2OOo/HTTPPostRequest.xba>
208-
[13]: <https://github.com/prrvchr/OAuth2OOo/blob/master/source/OAuth2OOo/OAuth2OOo/ChatGPTRequest.xba>
209-
[14]: <https://github.com/prrvchr/OAuth2OOo/blob/master/source/OAuth2OOo/OAuth2OOo/GoogleAPIRequest.xba>
210-
[15]: <https://github.com/prrvchr/OAuth2OOo/blob/master/source/OAuth2OOo/OAuth2OOo/GraphAPIRequest.xba>
211-
[16]: <https://github.com/prrvchr/OAuth2OOo/blob/master/source/OAuth2OOo/OAuth2OOo/GithubDownloadRequest.xba>
212-
[17]: <https://github.com/prrvchr/OAuth2OOo/releases/latest/download/LDLC-MacBook-Pro.ods>
213-
[18]: <https://github.com/prrvchr/OAuth2OOo/releases/latest/download/LDLC-Asus-Zenbook.ods>
214-
[19]: <https://pypi.org/project/selenium/4.16.0/>
215-
[20]: <https://github.com/prrvchr/OAuth2OOo/releases/latest/download/Page-Jaunes-Windows.ods>
216-
[21]: <https://github.com/prrvchr/OAuth2OOo/releases/latest/download/Page-Jaunes-Linux.ods>
217-
[22]: <https://github.com/prrvchr/OAuth2OOo>
218-
[23]: <https://github.com/prrvchr/OAuth2OOo/issues/new>
219-
[24]: <https://www.libreoffice.org/download/download-libreoffice/>
220-
[25]: <https://github.com/prrvchr/OAuth2OOo/releases/latest/download/requirements.txt>
221-
[26]: <https://packaging.python.org/en/latest/tutorials/installing-packages/#use-pip-for-installing>
222-
[27]: <https://prrvchr.github.io/OAuth2OOo/img/OAuth2OOo.svg#middle>
223-
[28]: <https://github.com/prrvchr/OAuth2OOo/releases/latest/download/OAuth2OOo.oxt>
224-
[29]: <https://img.shields.io/github/downloads/prrvchr/OAuth2OOo/latest/total?label=v1.5.2#right>
225-
[30]: <https://prrvchr.github.io/OAuth2OOo/img/OAuth2Wizard1.png>
226-
[31]: <https://prrvchr.github.io/OAuth2OOo/img/OAuth2Wizard2.png>
227-
[32]: <https://prrvchr.github.io/OAuth2OOo/img/OAuth2Wizard3.png>
228-
[33]: <https://prrvchr.github.io/OAuth2OOo/img/OAuth2Wizard4.png>
229-
[34]: <https://prrvchr.github.io/OAuth2OOo/img/OAuth2Wizard5.png>
230-
[35]: <https://prrvchr.github.io/OAuth2OOo/img/OAuth2Wizard6.png>
231-
[36]: <https://prrvchr.github.io/OAuth2OOo/img/OAuth2Wizard7.png>
232-
[37]: <https://prrvchr.github.io/OAuth2OOo/img/OAuth2Wizard8.png>
233-
[38]: <https://github.com/LibreOffice/loeclipse>
234-
[39]: <https://adoptium.net/temurin/releases/?version=8&package=jdk>
235-
[40]: <https://ant.apache.org/manual/install.html>
236-
[41]: <https://downloadarchive.documentfoundation.org/libreoffice/old/7.6.7.2/>
237-
[42]: <https://github.com/prrvchr/OAuth2OOo.git>
238-
[43]: <https://bz.apache.org/ooo/show_bug.cgi?id=128569>
239-
[44]: <https://prrvchr.github.io/OAuth2OOo/CHANGELOG>
205+
[11]: <https://help.libreoffice.org/latest/en-US/text/sbasic/shared/01000000.html?DbPAR=BASIC>
206+
[12]: <https://github.com/prrvchr/OAuth2OOo/blob/master/source/OAuth2OOo/OAuth2OOo/HTTPGetRequest.xba>
207+
[13]: <https://github.com/prrvchr/OAuth2OOo/blob/master/source/OAuth2OOo/OAuth2OOo/HTTPPostRequest.xba>
208+
[14]: <https://github.com/prrvchr/OAuth2OOo/blob/master/source/OAuth2OOo/OAuth2OOo/ChatGPTRequest.xba>
209+
[15]: <https://github.com/prrvchr/OAuth2OOo/blob/master/source/OAuth2OOo/OAuth2OOo/GoogleAPIRequest.xba>
210+
[16]: <https://github.com/prrvchr/OAuth2OOo/blob/master/source/OAuth2OOo/OAuth2OOo/GraphAPIRequest.xba>
211+
[17]: <https://github.com/prrvchr/OAuth2OOo/blob/master/source/OAuth2OOo/OAuth2OOo/GithubDownloadRequest.xba>
212+
[18]: <https://github.com/prrvchr/OAuth2OOo/releases/latest/download/LDLC-MacBook-Pro.ods>
213+
[19]: <https://github.com/prrvchr/OAuth2OOo/releases/latest/download/LDLC-Asus-Zenbook.ods>
214+
[20]: <https://pypi.org/project/selenium/4.16.0/>
215+
[21]: <https://github.com/prrvchr/OAuth2OOo/releases/latest/download/Page-Jaunes-Windows.ods>
216+
[22]: <https://github.com/prrvchr/OAuth2OOo/releases/latest/download/Page-Jaunes-Linux.ods>
217+
[23]: <https://github.com/prrvchr/OAuth2OOo>
218+
[24]: <https://github.com/prrvchr/OAuth2OOo/issues/new>
219+
[25]: <https://www.libreoffice.org/download/download-libreoffice/>
220+
[26]: <https://github.com/prrvchr/OAuth2OOo/releases/latest/download/requirements.txt>
221+
[27]: <https://packaging.python.org/en/latest/tutorials/installing-packages/#use-pip-for-installing>
222+
[28]: <https://prrvchr.github.io/OAuth2OOo/img/OAuth2OOo.svg#middle>
223+
[29]: <https://github.com/prrvchr/OAuth2OOo/releases/latest/download/OAuth2OOo.oxt>
224+
[30]: <https://github.com/prrvchr/OAuth2OOo/blob/master/uno/rdb/idl/com/sun/star/auth/XOAuth2Service.idl>
225+
[31]: <https://github.com/prrvchr/OAuth2OOo/blob/master/uno/rdb/idl/com/sun/star/rest/XRequestParameter.idl>
226+
[32]: <https://github.com/prrvchr/OAuth2OOo/blob/master/uno/rdb/idl/com/sun/star/rest/XRequestResponse.idl>
227+
[33]: <https://img.shields.io/github/downloads/prrvchr/OAuth2OOo/latest/total?label=v1.5.3#right>
228+
[34]: <https://prrvchr.github.io/OAuth2OOo/img/OAuth2Wizard1.png>
229+
[35]: <https://prrvchr.github.io/OAuth2OOo/img/OAuth2Wizard2.png>
230+
[36]: <https://prrvchr.github.io/OAuth2OOo/img/OAuth2Wizard3.png>
231+
[37]: <https://prrvchr.github.io/OAuth2OOo/img/OAuth2Wizard4.png>
232+
[38]: <https://prrvchr.github.io/OAuth2OOo/img/OAuth2Wizard5.png>
233+
[39]: <https://prrvchr.github.io/OAuth2OOo/img/OAuth2Wizard6.png>
234+
[40]: <https://prrvchr.github.io/OAuth2OOo/img/OAuth2Wizard7.png>
235+
[41]: <https://prrvchr.github.io/OAuth2OOo/img/OAuth2Wizard8.png>
236+
[42]: <https://github.com/LibreOffice/loeclipse>
237+
[43]: <https://adoptium.net/temurin/releases/?version=8&package=jdk>
238+
[44]: <https://ant.apache.org/manual/install.html>
239+
[45]: <https://downloadarchive.documentfoundation.org/libreoffice/old/7.6.7.2/>
240+
[46]: <https://github.com/prrvchr/OAuth2OOo.git>
241+
[47]: <https://bz.apache.org/ooo/show_bug.cgi?id=128569>
242+
[48]: <https://prrvchr.github.io/OAuth2OOo/CHANGELOG>

0 commit comments

Comments
 (0)