summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/orbsvcs/ATLAS.idl
blob: c313ef474c61a174c88c39427491ce384bdaf8a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
// -*- IDL -*-

//=============================================================================
/**
 *  @file   ATLAS.idl
 *
 *  $Id$
 *
 *  IDL for Authorization Token Layer Acquisition Service (ATLAS).
 *
 *  @author Object Management Group
 */
//=============================================================================


#ifndef _ATLAS_IDL_
#define _ATLAS_IDL_

#include <TimeBase.idl>
#include <CosNaming.idl>
#include <CSI.idl>
#include <CSIIOP.idl>

#pragma prefix "omg.org"

module ATLAS {
  typedef sequence<TimeBase::UtcT, 1> ExpiryTime;
  typedef sequence<CSI::IdentityToken, 1> IdTokenOption;

  struct AuthTokenData {
    IdTokenOption           ident_token;
    CSI::AuthorizationToken auth_token;
    ExpiryTime              expiry_time;
  };

  exception IllegalTokenRequest {
    unsigned long the_errnum;
    string   the_reason;
  };

  exception TokenOkay {};

  interface AuthTokenDispenser {
    AuthTokenData get_my_authorization_token ()
      raises (IllegalTokenRequest);

    AuthTokenData translate_authorization_token (
        in CSI::IdentityToken the_subject,
        in CSI::AuthorizationToken the_token)
      raises (IllegalTokenRequest,
              TokenOkay);
  };

  struct CosNamingLocator {
    CosNaming::NamingContext name_service;
    CosNaming::Name          the_name;
  };

  //
  // This type specifies a string encoded in UTF-8 form [IETF RFC 2044].
  //
  typedef sequence<octet> UTF8String;
  typedef CosNaming::NamingContextExt::URLString URLocator;

  typedef unsigned long ATLASLocatorType;

  const ATLASLocatorType ATLASCosNaming = 1;
  const ATLASLocatorType ATLASURL       = 2;
  const ATLASLocatorType ATLASObject    = 3;

  union ATLASLocator switch (ATLASLocatorType)
  {
  case ATLASCosNaming: CosNamingLocator   naming_locator;
  case ATLASURL:       URLocator          the_url;
  case ATLASObject:    AuthTokenDispenser the_depenser;
  };

  typedef sequence<octet> ATLASCacheId;

  struct ATLASProfile {
    ATLASLocator                    the_locator;
    ATLASCacheId                    the_cache_id;
  };

  const CSIIOP::ServiceConfigurationSyntax SCS_ATLAS = 3;
};

#endif // _ATLAS_IDL_