Revision 8cb96389 docs/astakos-api-guide.rst

b/docs/astakos-api-guide.rst
310 310
Authenticate
311 311
^^^^^^^^^^^^
312 312

  
313
Fallback call which receives the user token or the user uuid/token and returns
314
back the token as well as information about the token holder and the services
315
he/she can access.
313
Fallback call which receives the user token or the user uuid/token pair and
314
returns back the token as well as information about the token holder and the
315
services he/she can access.
316 316

  
317 317
========================================= =========  ==================
318 318
Uri                                       Method     Description
319 319
========================================= =========  ==================
320
``/astakos/api/tokens/``                  POST       Checks whether the provided token is valid and conforms with the provided uuid (if present) and returns back information about the user
320
``/identity/v2.0/tokens/``                POST       Checks whether the provided token is valid and conforms with the provided uuid (if present) and returns back information about the user
321 321
========================================= =========  ==================
322 322

  
323 323
The input should be json formatted.
......
328 328

  
329 329
    {
330 330
        "auth":{
331
            "passwordCredentials":{
332
                "username":"c18088be-16b1-4263-8180-043c54e22903",
333
                "password":"CDEe2k0T/HdiJWBMMbHyOA=="
331
            "token":{
332
                "id":"CDEe2k0T/HdiJWBMMbHyOA=="
334 333
            },
335 334
            "tenantName":"c18088be-16b1-4263-8180-043c54e22903"
336 335
        }
......
342 341

  
343 342
    {
344 343
        "auth":{
345
            "token":{
346
                "id":"CDEe2k0T/HdiJWBMMbHyOA=="
344
            "passwordCredentials":{
345
                "username":"c18088be-16b1-4263-8180-043c54e22903",
346
                "password":"CDEe2k0T/HdiJWBMMbHyOA=="
347 347
            },
348 348
            "tenantName":"c18088be-16b1-4263-8180-043c54e22903"
349 349
        }
......
359 359

  
360 360
::
361 361

  
362
    {'serviceCatalog': [
363
        {'endpoints': [{'SNF:uiURL': 'https://node1.example.com/ui/',
364
                        'adminURL': 'https://node1.example.com/v1',
365
                        'internalUrl': 'https://node1.example.com/v1',
366
                        'publicURL': 'https://node1.example.com/v1',
367
                        'region': 'cyclades'}],
368
         'name': 'cyclades',
369
         'type': 'compute'},
370
       {'endpoints': [{'SNF:uiURL': 'https://node2.example.com/ui/',
371
                      'adminURL': 'https://node2.example.com/v1',
372
                      'internalUrl': 'https://node2.example.com/v1',
373
                      'publicURL': 'https://node2.example.com/v1',
374
                      'region': 'pithos'}],
375
        'name': 'pithos',
376
        'type': 'storage'}],
377
     'token': {'expires': '2013-06-19T15:23:59.975572+00:00',
378
               'id': 'CDEe2k0T/HdiJWBMMbHyOA==',
379
               'tenant': {'id': 'c18088be-16b1-4263-8180-043c54e22903',
380
                          'name': 'Firstname Lastname'}},
381
     'user': {'id': 'c18088be-16b1-4263-8180-043c54e22903',
382
              'name': 'Firstname Lastname',
383
              'roles': [{'id': 1, 'name': 'default'}],
384
              'roles_links': []}}
385

  
362
    {"access": {
363
        "serviceCatalog": [
364
           {"SNF:uiURL": "https://node2.example.com/ui/",
365
            "endpoints": [{
366
                "publicURL": "https://object-store.example.synnefo.org/pithos/public/v2.0",
367
                "versionId": "v2.0"}],
368
            "endpoints_links": [],
369
            "name": "pithos_public",
370
            "type": "public"},
371
           {"SNF:uiURL": "https://node2.example.com/ui/",
372
            "endpoints": [{
373
                "publicURL": "https://object-store.example.synnefo.org/pithos/object-store/v1",
374
                "versionId": "v1"}],
375
            "endpoints_links": [],
376
            "name": "pithos_object-store",
377
            "type": "object-store"},
378
           {"SNF:uiURL": "https://node2.example.com/ui/",
379
            "endpoints": [{
380
                "publicURL": "https://object-store.example.synnefo.org/pithos/ui",
381
                "versionId": ""}],
382
            "endpoints_links": [],
383
            "name": "pithos_ui",
384
            "type": "pithos_ui"},
385
           {"SNF:uiURL": "http://localhost:8080",
386
            "endpoints": [{
387
                "publicURL": "https://accounts.example.synnefo.org/ui/v1.0",
388
                "versionId": "v1.0"}],
389
            "endpoints_links": [],
390
            "name": "astakos_ui",
391
            "type": "astakos_ui"},
392
           {"SNF:uiURL": "http://localhost:8080",
393
            "endpoints": [{
394
                "publicURL": "https://accounts.example.synnefo.org/account/v1.0",
395
                "versionId": "v1.0"}],
396
            "endpoints_links": [],
397
            "name": "astakos_account",
398
            "type": "account"},
399
           {"SNF:uiURL": "http://localhost:8080",
400
            "endpoints": [{
401
                "publicURL": "https://accounts.example.synnefo.org/identity/v2.0",
402
                "versionId": "v2.0"}],
403
            "endpoints_links": [],
404
            "name": "astakos_keystone",
405
            "type": "identity"}],
406
      "token": {
407
          "expires": "2013-06-19T15:23:59.975572+00:00",
408
           "id": "CDEe2k0T/HdiJWBMMbHyOA==",
409
           "tenant": {"id": "c18088be-16b1-4263-8180-043c54e22903",
410
            "name": "Firstname Lastname"}},
411
      "user": {
412
          "id": "c18088be-16b1-4263-8180-043c54e22903",
413
           "name": "Firstname Lastname",
414
           "roles": [{"id": 1, "name": "default"},
415
           "roles_links": []}}}
386 416

  
387 417
Example xml response:
388 418

  
389 419
::
390 420

  
391 421
    <?xml version="1.0" encoding="UTF-8"?>
422

  
392 423
    <access xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
393 424
        xmlns="http://docs.openstack.org/identity/api/v2.0">
394 425
        <token id="CDEe2k0T/HdiJWBMMbHyOA==" expires="2013-06-19T15:23:59.975572+00:00">
......
400 431
            </roles>
401 432
        </user>
402 433
        <serviceCatalog>
403
            <service type="None" name="cyclades">
404
                    <endpoint region="cyclades"
405
                        publicURL="https://node1.example.com/v1"
406
                        adminURL="https://node1.example.com/v1"
407
                        internalURL="https://node1.example.com/v1"
408
                        SNF:uiURL="https://node1.example.com/ui/">
409
                </endpoint>
434
            <service type="public" name="pithos_public" SNF:uiURL="">
435
                    <endpoint
436
                            versionId="v2.0"
437
                            publicURL="https://object-store.example.synnefo.org/pithos/public/v2.0"
438
            </service>
439
            <service type="object-store" name="pithos_object-store" SNF:uiURL="">
440
                    <endpoint
441
                            versionId="v1"
442
                            publicURL="https://object-store.example.synnefo.org/pithos/object-store/v1"
443
            </service>
444
            <service type="pithos_ui" name="pithos_ui" SNF:uiURL="">
445
                    <endpoint
446
                            versionId=""
447
                            publicURL="https://object-store.example.synnefo.org/pithos/ui"
448
            </service>
449
            <service type="astakos_ui" name="astakos_ui" SNF:uiURL="">
450
                    <endpoint
451
                            versionId="v1.0"
452
                            publicURL="https://accounts.example.synnefo.org/ui/v1.0"
453
            </service>
454
            <service type="account" name="astakos_account" SNF:uiURL="">
455
                    <endpoint
456
                            versionId="v1.0"
457
                            publicURL="https://accounts.example.synnefo.org/account/v1.0"
410 458
            </service>
411
            <service type="None" name="pithos">
412
                <endpoint
413
                        region="pithos"
414
                        publicURL="https://node2.example.com/v1"
415
                        adminURL="https://node2.example.com/v1"
416
                        internalURL="https://node2.example.com/v1"
417
                        SNF:uiURL="https://node2.example.com/ui/">
418
                </endpoint>
459
            <service type="identity" name="astakos_keystone" SNF:uiURL="">
460
                    <endpoint
461
                            versionId="v2.0"
462
                            publicURL="https://accounts.example.synnefo.org/identity/v2.0"
419 463
            </service>
420 464
        </serviceCatalog>
421 465
    </access>

Also available in: Unified diff