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
`JasperserverRestClient` supports three authentication types: REST, SPRING and BASIC.
169
+
`REST` type of authentication means that your credentials are sent through `/rest/login`, and in the `SPRING` mode – through `/j_security_check directly/`. Using these types you obtain JSESSIONID cookie of authenticated session after sending credentials.
170
+
In the `BASIC` mode `JasperserverRestClient` uses basic authentication (sends encrypted credentials with each request).
171
+
Client uses `REST` authentication by default but you can change the mode using follow code:
Or specify authentication type in RestClientConfiguration instance (for details, read section [Configuration](https://github.com/Jaspersoft/jrs-rest-java-client/blob/master/README.md#configuration).
176
+
Please notice, the basic authentication is not stateless and it is valid till method logout() is called or the application is restarted.
177
+
167
178
####Invalidating session
168
179
Not to store session on server you can invalidate it with `logout()` method.
To assign role membership to a user, set the roles property on the user account with the PUT method of the rest_
816
-
v2/users service. For details, see section [creating a user](https://github.com/boryskolesnykov/jasperserver-rest-client/edit/master/README.md#creating-a-user).
827
+
v2/users service. For details, see section [creating a user](https://github.com/Jaspersoft/jrs-rest-java-client/blob/master/README.md#creating-a-user).
817
828
####Deleting a Role
818
829
To delete a role, send the DELETE method and specify the role ID (name) in the URL.
819
830
When this method is successful, the role is permanently deleted.
@@ -905,7 +916,7 @@ There are two operations on file resources:
905
916
* Viewing the file resource details to determine the file format
906
917
* Downloading the binary file contents
907
918
908
-
To view the file resource details, specify the URL of the file in `resource()` method and use the code form [Viewing Resource Details](https://github.com/boryskolesnykov/jasperserver-rest-client/edit/master/README.md#viewing-resource-details) section.
919
+
To view the file resource details, specify the URL of the file in `resource()` method and use the code form [Viewing Resource Details](https://github.com/Jaspersoft/jrs-rest-java-client/blob/master/README.md#viewing-resource-details) section.
909
920
To download file binary content, specify the URL of the file in `resource()` method and use the code below
It is possible to log outgoing requests and incoming responses using `logHttp` property of `RestCleintConfiguration`:
1562
+
```java
1563
+
config.setLogHttp(true);
1564
+
```
1565
+
Also, you are able to log entities using `logHttpEntity` option:
1566
+
```java
1567
+
config.setLogHttpEntity(true).
1568
+
```
1569
+
1549
1570
###Possible issues
1550
1571
1. <strong>Deploying jrs-rest-client within web app to any Appplication Server, e.g. JBoss, Glassfish, WebSphere etc.</strong>
1551
1572
jrs-rest-client uses the implementation of JAX-RS API of version 2.0 and if your application server does not support this version you will get an error. To solve this problem you need to add to your application a deployment configuration specific for your AS where you need to exclude modules with old JAX-RS API version. Example of such descriptor for JBoss AS you can find below:
0 commit comments