Last modified by christoph_lechleitner@iteg_at on 2013-02-02 05.47:41

From version 4.1
edited by christoph_lechleitner@iteg_at
on 2012-11-08 06.51:11
Change comment: There is no comment for this version
To version 7.1
edited by christoph_lechleitner@iteg_at
on 2012-11-20 09.37:50
Change comment: Adding email address field to JSON variant of user principals

Summary

Details

Page properties
Content
... ... @@ -61,7 +61,7 @@
61 61  
62 62  The server may enforce the use of HTTP basic authentication in order to keep offending servers away from dictionary attacks.
63 63  
64 -===== {{id name="HTTPauthenticationAPING-JSONvariant"/}}JSON variant =====
64 +===== {{id name="HTTPauthenticationAPING-JSONvariants"/}}JSON variants =====
65 65  
66 66  A backend may support to return the response in the form of small JSON documents.
67 67  
... ... @@ -83,10 +83,10 @@
83 83  
84 84  (% style="list-style-type: square;" %)
85 85  * (((
86 -a short message, like
86 +a short info message, like
87 87  
88 88  {{code language="none"}}
89 -{ "message" : "Some message to use in log files" }
89 +{ "info" : "Some message to use in log files" }
90 90  {{/code}}
91 91  )))
92 92  * (% style="color: rgb(0,0,0);" %)or a list of named values, for examples scroll down to the operation chapters
... ... @@ -120,10 +120,20 @@
120 120  user=<user>&passwd=<passwd>
121 121  {{/code}}
122 122  
123 -====== {{id name="HTTPauthenticationAPING-Responsebody"/}}Response body ======
123 +====== {{id name="HTTPauthenticationAPING-Responsebody(plainnon-JSONvariant)"/}}Response body(% style="color: rgb(0,0,0);" %) (plain non-JSON variant)(%%) ======
124 124  
125 -(% style="color: rgb(0, 0, 0); color: rgb(0, 0, 0)" %)Non-empty information text, not more (% style="color: rgb(0,0,0);" %)than 1024 bytes. The message may go into logfiles and should not be displayed to the user.
125 +(% style="color: rgb(0, 0, 0); color: rgb(0, 0, 0)" %)Non-empty information text, not more (% style="color: rgb(0,0,0);" %)than 1024 bytes. The message may go into logfiles and should not be displayed to the user.
126 126  
127 +====== {{id name="HTTPauthenticationAPING-Responsebody(JSONvariant)"/}}(% style="color: rgb(0, 0, 0); color: rgb(0, 0, 0)" %)Response body (JSON variant)(%%) ======
128 +
129 +(% style="color: rgb(0, 0, 0); color: rgb(0, 0, 0)" %)Successful:
130 +
131 +{{code language="none"}}
132 +{ "user" : "jdoe", "prettyName" : "John Doe", "eMailAddress" : "jdoe@foo.bar" }
133 +{{/code}}
134 +
135 +Not found or problem: See documentation of "searchUser".
136 +
127 127  ==== {{id name="HTTPauthenticationAPING-getSupportedOperations"/}}getSupportedOperations ====
128 128  
129 129  ====== {{id name="HTTPauthenticationAPING-Requestbody"/}}Request body ======
... ... @@ -151,7 +151,7 @@
151 151  ====== {{id name="HTTPauthenticationAPING-Responsebody(JSONvariant)"/}}Response body (JSON variant) ======
152 152  
153 153  {{code language="none"}}
154 -{ "operations": [ "getSupportedOperations", "tryLogin" ] }
164 +[ "getSupportedOperations", "tryLogin" ]
155 155  {{/code}}
156 156  
157 157  == {{id name="HTTPauthenticationAPING-OptionalOperations"/}}(% style="color: rgb(0,0,0);" %)Optional Operations(%%) ==
... ... @@ -209,7 +209,7 @@
209 209  ====== {{id name="HTTPauthenticationAPING-Responsebody(JSONvariant)"/}}Response body (JSON variant) ======
210 210  
211 211  {{code language="none"}}
212 -{ "defaultDomain": [ "SOMEDOMAIN" ] }
222 +[ "SOMEDOMAIN" ]
213 213  {{/code}}
214 214  
215 215  ==== {{id name="HTTPauthenticationAPING-getGroups"/}}getGroups ====
... ... @@ -226,8 +226,19 @@
226 226  
227 227  ====== {{id name="HTTPauthenticationAPING-Responsebody(plainnon-JSONvariant)"/}}(% style="color: rgb(0, 0, 0); color: rgb(0, 0, 0)" %)Response body (plain non-JSON variant)(%%) ======
228 228  
229 -(% style="color: rgb(0, 0, 0); color: rgb(0, 0, 0)" %) (% style="color: rgb(0,0,0);" %)List of group names, separated by '(% style="color: rgb(0,0,0);" %){{code language="none"}},{{/code}}' or just '(% style="color: rgb(0,0,0);" %){{code language="none"}}-{{/code}}' if the user is not member of any group, or '(% style="color: rgb(0,0,0);" %){{code language="none"}}--{{/code}}' if there is no group support.
239 +(% style="color: rgb(0,0,0);" %)List of group names, separated by '(% style="color: rgb(0,0,0);" %){{code language="none"}},{{/code}}' or just '(% style="color: rgb(0,0,0);" %){{code language="none"}}-{{/code}}' if the user is not member of any group, or '(% style="color: rgb(0,0,0);" %){{code language="none"}}--{{/code}}' if there is no group support.
230 230  
241 +====== {{id name="HTTPauthenticationAPING-Responsebody(JSONvariant)"/}}Response body (JSON variant) ======
242 +
243 +The following example shows a list of 2 groups, one with maximum details, one wiht miniimal details:
244 +
245 +{{code language="none"}}
246 +[ 
247 + { "group" : "users", "prettyName" : "Human users of this system", "domain" : "MYDOMAIN" } ,
248 + { "group" : "dialout" }
249 +]
250 +{{/code}}
251 +
231 231  ==== {{id name="HTTPauthenticationAPING-getGroupMembers"/}}getGroupMembers ====
232 232  
233 233  Returns the users the are a member of the specified group.
... ... @@ -244,6 +244,16 @@
244 244  
245 245  (% style="color: rgb(0,0,0);" %)List of group names, separated by '{{code language="none"}},{{/code}}' or just '{{code language="none"}}-{{/code}}' if the user is not member of any group, or '{{code language="none"}}--{{/code}}' if there is no group support.
246 246  
268 +====== {{id name="HTTPauthenticationAPING-Responsebody(JSONvariant)"/}}Response body (JSON variant) ======
269 +
270 +{{code language="none"}}
271 +[
272 + { "user" : "leonard", "prettyName" : "Leonard Hofstaetter", "eMailAddress" : "lh@tbbt.foo.bar" } ,
273 + { "user" : "penny" } ,
274 + { "user" : "sheldon" }
275 +]
276 +{{/code}}
277 +
247 247  ==== {{id name="HTTPauthenticationAPING-sendPassword"/}}sendPassword ====
248 248  
249 249  Generates a new password or send a "new password" link to the user.
... ... @@ -277,4 +277,22 @@
277 277  
278 278  (% style="color: rgb(0,0,0);" %)Non-empty information text, not more than 1024 bytes. The message may go into logfiles and should not be displayed to the user.
279 279  
280 -
311 +====== {{id name="HTTPauthenticationAPING-Responsebody(JSONvariant)"/}}Response body (JSON variant) ======
312 +
313 +Successful, with response code 200:
314 +
315 +{{code language="none"}}
316 +{ "user" : "jdoe", "prettyName" : "John Doe", "eMailAddress" : "jdoe@foo.bar" }
317 +{{/code}}
318 +
319 +Not found, with response code 404:
320 +
321 +{{code language="none"}}
322 +{ "error" : "user not found" }
323 +{{/code}}
324 +
325 +Problem, with repsonse code 500:
326 +
327 +{{code language="none"}}
328 +{ "error" : "Operation not supported by backend for specified domain" }
329 +{{/code}}
Confluence.Code.ConfluencePageClass[0]
Id
... ... @@ -1,1 +1,1 @@
1 -688875
1 +688908
URL
... ... @@ -1,1 +1,1 @@
1 -https://clazzes.atlassian.net/wiki/spaces/LOGIN/pages/688875/HTTP authentication API NG
1 +https://clazzes.atlassian.net/wiki/spaces/LOGIN/pages/688908/HTTP authentication API NG