Commit 98ed799
committed
Prevent call to the login method for non cookie based authentication
It seems that making a call to the login method in the constructor fail
in some cases even this should not happened (as ids are passed in the
URI by default, login should always return true).
The login is not necessary for non cookie based authentication but is
required for cookie based authentication. Also, it is preferable to
ensure the connection work in the constructor (instead of throwing
an exception at the first call).
For cookie based authentication, the login is still done but for simple
authentication this has been replaced by a call retrieving the version.
For having coherent message between simple and cookie authentication,
the call to the version catch 401 errors to show the same message when
ids are not valid.
This should fix #15 and #161 parent 6127908 commit 98ed799
1 file changed
+14
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
158 | | - | |
| 158 | + | |
| 159 | + | |
159 | 160 | | |
160 | 161 | | |
161 | 162 | | |
162 | 163 | | |
163 | 164 | | |
164 | 165 | | |
165 | 166 | | |
166 | | - | |
167 | | - | |
168 | | - | |
| 167 | + | |
| 168 | + | |
169 | 169 | | |
170 | 170 | | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
171 | 179 | | |
172 | 180 | | |
173 | 181 | | |
| |||
0 commit comments