@azure/functions-authentication-events 1.0.0-beta.2 → 1.0.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (131) hide show
  1. package/LICENSE +3 -3
  2. package/README.md +125 -117
  3. package/dist/browser/constants.d.ts +2 -0
  4. package/dist/browser/constants.d.ts.map +1 -0
  5. package/{dist-esm/src → dist/browser}/constants.js +1 -1
  6. package/{dist-esm/src → dist/browser}/constants.js.map +1 -1
  7. package/dist/browser/events.d.ts +87 -0
  8. package/dist/browser/events.d.ts.map +1 -0
  9. package/{dist-esm/src → dist/browser}/events.js +1 -1
  10. package/dist/browser/events.js.map +1 -0
  11. package/dist/browser/index.d.ts +5 -0
  12. package/dist/browser/index.d.ts.map +1 -0
  13. package/dist/browser/index.js +5 -0
  14. package/dist/browser/index.js.map +1 -0
  15. package/dist/browser/logger.d.ts +7 -0
  16. package/dist/browser/logger.d.ts.map +1 -0
  17. package/{dist-esm/src → dist/browser}/logger.js +1 -1
  18. package/{dist-esm/src → dist/browser}/logger.js.map +1 -1
  19. package/dist/browser/package.json +3 -0
  20. package/dist/browser/tokenIssuanceStart/actions.d.ts +17 -0
  21. package/dist/browser/tokenIssuanceStart/actions.d.ts.map +1 -0
  22. package/{dist-esm/src → dist/browser}/tokenIssuanceStart/actions.js +1 -1
  23. package/dist/browser/tokenIssuanceStart/actions.js.map +1 -0
  24. package/dist/browser/tokenIssuanceStart/context.d.ts +105 -0
  25. package/dist/browser/tokenIssuanceStart/context.d.ts.map +1 -0
  26. package/dist/browser/tokenIssuanceStart/context.js +4 -0
  27. package/dist/browser/tokenIssuanceStart/context.js.map +1 -0
  28. package/dist/browser/tokenIssuanceStart/index.d.ts +3 -0
  29. package/dist/browser/tokenIssuanceStart/index.d.ts.map +1 -0
  30. package/dist/browser/tokenIssuanceStart/index.js +4 -0
  31. package/{dist-esm/src → dist/browser}/tokenIssuanceStart/index.js.map +1 -1
  32. package/dist/commonjs/constants.d.ts +2 -0
  33. package/dist/commonjs/constants.d.ts.map +1 -0
  34. package/dist/commonjs/constants.js +7 -0
  35. package/dist/commonjs/constants.js.map +1 -0
  36. package/dist/commonjs/events.d.ts +87 -0
  37. package/dist/commonjs/events.d.ts.map +1 -0
  38. package/dist/commonjs/events.js +17 -0
  39. package/dist/commonjs/events.js.map +1 -0
  40. package/dist/commonjs/index.d.ts +5 -0
  41. package/dist/commonjs/index.d.ts.map +1 -0
  42. package/dist/commonjs/index.js +10 -0
  43. package/dist/commonjs/index.js.map +1 -0
  44. package/dist/commonjs/logger.d.ts +7 -0
  45. package/dist/commonjs/logger.d.ts.map +1 -0
  46. package/dist/commonjs/logger.js +13 -0
  47. package/dist/commonjs/logger.js.map +1 -0
  48. package/dist/commonjs/package.json +3 -0
  49. package/dist/commonjs/tokenIssuanceStart/actions.d.ts +17 -0
  50. package/dist/commonjs/tokenIssuanceStart/actions.d.ts.map +1 -0
  51. package/dist/commonjs/tokenIssuanceStart/actions.js +13 -0
  52. package/dist/commonjs/tokenIssuanceStart/actions.js.map +1 -0
  53. package/dist/commonjs/tokenIssuanceStart/context.d.ts +105 -0
  54. package/dist/commonjs/tokenIssuanceStart/context.d.ts.map +1 -0
  55. package/dist/commonjs/tokenIssuanceStart/context.js +5 -0
  56. package/dist/commonjs/tokenIssuanceStart/context.js.map +1 -0
  57. package/dist/commonjs/tokenIssuanceStart/index.d.ts +3 -0
  58. package/dist/commonjs/tokenIssuanceStart/index.d.ts.map +1 -0
  59. package/dist/commonjs/tokenIssuanceStart/index.js +8 -0
  60. package/dist/commonjs/tokenIssuanceStart/index.js.map +1 -0
  61. package/{types/latest → dist/commonjs}/tsdoc-metadata.json +11 -11
  62. package/dist/esm/constants.d.ts +2 -0
  63. package/dist/esm/constants.d.ts.map +1 -0
  64. package/dist/esm/constants.js +4 -0
  65. package/dist/esm/constants.js.map +1 -0
  66. package/dist/esm/events.d.ts +87 -0
  67. package/dist/esm/events.d.ts.map +1 -0
  68. package/dist/esm/events.js +14 -0
  69. package/dist/esm/events.js.map +1 -0
  70. package/dist/esm/index.d.ts +5 -0
  71. package/dist/esm/index.d.ts.map +1 -0
  72. package/dist/esm/index.js +5 -0
  73. package/dist/esm/index.js.map +1 -0
  74. package/dist/esm/logger.d.ts +7 -0
  75. package/dist/esm/logger.d.ts.map +1 -0
  76. package/dist/esm/logger.js +10 -0
  77. package/dist/esm/logger.js.map +1 -0
  78. package/dist/esm/package.json +3 -0
  79. package/dist/esm/tokenIssuanceStart/actions.d.ts +17 -0
  80. package/dist/esm/tokenIssuanceStart/actions.d.ts.map +1 -0
  81. package/dist/esm/tokenIssuanceStart/actions.js +10 -0
  82. package/dist/esm/tokenIssuanceStart/actions.js.map +1 -0
  83. package/dist/esm/tokenIssuanceStart/context.d.ts +105 -0
  84. package/dist/esm/tokenIssuanceStart/context.d.ts.map +1 -0
  85. package/dist/esm/tokenIssuanceStart/context.js +4 -0
  86. package/dist/esm/tokenIssuanceStart/context.js.map +1 -0
  87. package/dist/esm/tokenIssuanceStart/index.d.ts +3 -0
  88. package/dist/esm/tokenIssuanceStart/index.d.ts.map +1 -0
  89. package/dist/esm/tokenIssuanceStart/index.js +4 -0
  90. package/dist/esm/tokenIssuanceStart/index.js.map +1 -0
  91. package/dist/react-native/constants.d.ts +2 -0
  92. package/dist/react-native/constants.d.ts.map +1 -0
  93. package/dist/react-native/constants.js +4 -0
  94. package/dist/react-native/constants.js.map +1 -0
  95. package/dist/react-native/events.d.ts +87 -0
  96. package/dist/react-native/events.d.ts.map +1 -0
  97. package/dist/react-native/events.js +14 -0
  98. package/dist/react-native/events.js.map +1 -0
  99. package/dist/react-native/index.d.ts +5 -0
  100. package/dist/react-native/index.d.ts.map +1 -0
  101. package/dist/react-native/index.js +5 -0
  102. package/dist/react-native/index.js.map +1 -0
  103. package/dist/react-native/logger.d.ts +7 -0
  104. package/dist/react-native/logger.d.ts.map +1 -0
  105. package/dist/react-native/logger.js +10 -0
  106. package/dist/react-native/logger.js.map +1 -0
  107. package/dist/react-native/package.json +3 -0
  108. package/dist/react-native/tokenIssuanceStart/actions.d.ts +17 -0
  109. package/dist/react-native/tokenIssuanceStart/actions.d.ts.map +1 -0
  110. package/dist/react-native/tokenIssuanceStart/actions.js +10 -0
  111. package/dist/react-native/tokenIssuanceStart/actions.js.map +1 -0
  112. package/dist/react-native/tokenIssuanceStart/context.d.ts +105 -0
  113. package/dist/react-native/tokenIssuanceStart/context.d.ts.map +1 -0
  114. package/dist/react-native/tokenIssuanceStart/context.js +4 -0
  115. package/dist/react-native/tokenIssuanceStart/context.js.map +1 -0
  116. package/dist/react-native/tokenIssuanceStart/index.d.ts +3 -0
  117. package/dist/react-native/tokenIssuanceStart/index.d.ts.map +1 -0
  118. package/dist/react-native/tokenIssuanceStart/index.js +4 -0
  119. package/dist/react-native/tokenIssuanceStart/index.js.map +1 -0
  120. package/package.json +84 -79
  121. package/dist/index.js +0 -31
  122. package/dist/index.js.map +0 -1
  123. package/dist-esm/src/events.js.map +0 -1
  124. package/dist-esm/src/index.js +0 -5
  125. package/dist-esm/src/index.js.map +0 -1
  126. package/dist-esm/src/tokenIssuanceStart/actions.js.map +0 -1
  127. package/dist-esm/src/tokenIssuanceStart/context.js +0 -4
  128. package/dist-esm/src/tokenIssuanceStart/context.js.map +0 -1
  129. package/dist-esm/src/tokenIssuanceStart/index.js +0 -4
  130. package/types/3.1/functions-authentication-events.d.ts +0 -202
  131. package/types/latest/functions-authentication-events.d.ts +0 -224
@@ -0,0 +1,105 @@
1
+ /**
2
+ * Container file for all interfaces that pertain to the OnTokenIssuanceStart event API schema version 10-01-2021-preview.
3
+ */
4
+ import type { ActionableCloudEventResponse, AuthenticationEventAction, AuthenticationEventData, CloudEventRequest } from "../events.js";
5
+ /**
6
+ * The main request interface, this will relate it's response and payload.
7
+ */
8
+ export interface TokenIssuanceStartRequest extends CloudEventRequest<TokenIssuanceStartResponse, TokenIssuanceStartData> {
9
+ /** A dictionary of token claims. */
10
+ tokenClaims?: Record<string, string>;
11
+ }
12
+ /**
13
+ * The main response interface that is related to the request, this extends IActionable as the response
14
+ * contains actions, we only allow actions that inherit the TokenIssuanceStartAction.
15
+ */
16
+ export type TokenIssuanceStartResponse = ActionableCloudEventResponse<TokenIssuanceStartAction>;
17
+ /**
18
+ * The main data interface related to the request.
19
+ */
20
+ export interface TokenIssuanceStartData extends AuthenticationEventData {
21
+ /** The main context of the data. */
22
+ authenticationContext: AuthenticationEventContext;
23
+ }
24
+ /**
25
+ * Client interface for data.
26
+ */
27
+ export interface AuthenticationEventContextClient {
28
+ /** The Ip Address */
29
+ ip: string;
30
+ /** Gets or sets the locale. */
31
+ locale: string;
32
+ /** Gets or sets the market. */
33
+ market: string;
34
+ }
35
+ /**
36
+ * ResourceServicePrincipal interface for data.
37
+ */
38
+ export interface AuthenticationEventContextServicePrincipal {
39
+ /** The identifier for the service principal. */
40
+ id: string;
41
+ /** The application identifier. */
42
+ appId: string;
43
+ /** The application display name. */
44
+ appDisplayName: string;
45
+ /** The display name. */
46
+ displayName: string;
47
+ }
48
+ /**
49
+ * User interface for data.
50
+ */
51
+ export interface AuthenticationEventContextUser {
52
+ /** The user's company name. */
53
+ companyName: string;
54
+ /** The user's country. */
55
+ country: string;
56
+ /** The user's display name. */
57
+ displayName: string;
58
+ /** The user's given name. */
59
+ givenName: string;
60
+ /** The user identifier. */
61
+ id: string;
62
+ /** The user's email address. */
63
+ mail: string;
64
+ /** The user's on premise SAM account name. */
65
+ onPremisesSamAccountName: string;
66
+ /** The user's on premise security identifier. */
67
+ onPremisesSecurityIdentifier: string;
68
+ /** The user's on premise principal name. */
69
+ onPremiseUserPrincipalName: string;
70
+ /** The user's preferred data location */
71
+ preferredDataLocation: string;
72
+ /** The user's preferred language. */
73
+ preferredLanguage: string;
74
+ /** The user's surname. */
75
+ surname: string;
76
+ /** The user's principal name. */
77
+ userPrincipalName: string;
78
+ /** The user type. */
79
+ userType: string;
80
+ }
81
+ /**
82
+ * Context interface for data.
83
+ */
84
+ export interface AuthenticationEventContext {
85
+ /** Unique identifier for the request. */
86
+ correlationId: string;
87
+ /** The client. */
88
+ client: AuthenticationEventContextClient;
89
+ /** The authorization protocol. */
90
+ authenticationProtocol: "OAUTH2.0" | "SAML" | "WS-FED" | "unknownFutureValue" | undefined;
91
+ /** The client service principal. */
92
+ clientServicePrincipal: AuthenticationEventContextServicePrincipal;
93
+ /** The resource service principal. */
94
+ resourceServicePrincipal: AuthenticationEventContextServicePrincipal;
95
+ /** Data pertaining to the user requesting a token. */
96
+ user: AuthenticationEventContextUser;
97
+ }
98
+ /**
99
+ * All actions for the token issuance start event should extended this interface, as it looks the correct action to the correct event.
100
+ */
101
+ export interface TokenIssuanceStartAction extends AuthenticationEventAction {
102
+ /** This will be the 'Name' of the action in the JSON. */
103
+ actionType: string;
104
+ }
105
+ //# sourceMappingURL=context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/tokenIssuanceStart/context.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,OAAO,KAAK,EACV,4BAA4B,EAC5B,yBAAyB,EACzB,uBAAuB,EACvB,iBAAiB,EAClB,MAAM,cAAc,CAAC;AAEtB;;GAEG;AACH,MAAM,WAAW,yBACf,SAAQ,iBAAiB,CAAC,0BAA0B,EAAE,sBAAsB,CAAC;IAC7E,oCAAoC;IACpC,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACtC;AAED;;;GAGG;AACH,MAAM,MAAM,0BAA0B,GAAG,4BAA4B,CAAC,wBAAwB,CAAC,CAAC;AAEhG;;GAEG;AACH,MAAM,WAAW,sBAAuB,SAAQ,uBAAuB;IACrE,oCAAoC;IACpC,qBAAqB,EAAE,0BAA0B,CAAC;CACnD;AAED;;GAEG;AACH,MAAM,WAAW,gCAAgC;IAC/C,qBAAqB;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,+BAA+B;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,+BAA+B;IAC/B,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,0CAA0C;IACzD,gDAAgD;IAChD,EAAE,EAAE,MAAM,CAAC;IACX,kCAAkC;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,oCAAoC;IACpC,cAAc,EAAE,MAAM,CAAC;IACvB,wBAAwB;IACxB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC7C,+BAA+B;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,0BAA0B;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,+BAA+B;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,6BAA6B;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,2BAA2B;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,gCAAgC;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,8CAA8C;IAC9C,wBAAwB,EAAE,MAAM,CAAC;IACjC,iDAAiD;IACjD,4BAA4B,EAAE,MAAM,CAAC;IACrC,4CAA4C;IAC5C,0BAA0B,EAAE,MAAM,CAAC;IACnC,yCAAyC;IACzC,qBAAqB,EAAE,MAAM,CAAC;IAC9B,qCAAqC;IACrC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,0BAA0B;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,iCAAiC;IACjC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,qBAAqB;IACrB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC,yCAAyC;IACzC,aAAa,EAAE,MAAM,CAAC;IACtB,kBAAkB;IAClB,MAAM,EAAE,gCAAgC,CAAC;IACzC,kCAAkC;IAClC,sBAAsB,EAAE,UAAU,GAAG,MAAM,GAAG,QAAQ,GAAG,oBAAoB,GAAG,SAAS,CAAC;IAC1F,oCAAoC;IACpC,sBAAsB,EAAE,0CAA0C,CAAC;IACnE,sCAAsC;IACtC,wBAAwB,EAAE,0CAA0C,CAAC;IACrE,sDAAsD;IACtD,IAAI,EAAE,8BAA8B,CAAC;CACtC;AAED;;GAEG;AACH,MAAM,WAAW,wBAAyB,SAAQ,yBAAyB;IACzE,yDAAyD;IACzD,UAAU,EAAE,MAAM,CAAC;CACpB"}
@@ -0,0 +1,4 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ export {};
4
+ //# sourceMappingURL=context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.js","sourceRoot":"","sources":["../../../src/tokenIssuanceStart/context.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * Container file for all interfaces that pertain to the OnTokenIssuanceStart event API schema version 10-01-2021-preview.\n */\nimport type {\n ActionableCloudEventResponse,\n AuthenticationEventAction,\n AuthenticationEventData,\n CloudEventRequest,\n} from \"../events.js\";\n\n/**\n * The main request interface, this will relate it's response and payload.\n */\nexport interface TokenIssuanceStartRequest\n extends CloudEventRequest<TokenIssuanceStartResponse, TokenIssuanceStartData> {\n /** A dictionary of token claims. */\n tokenClaims?: Record<string, string>;\n}\n\n/**\n * The main response interface that is related to the request, this extends IActionable as the response\n * contains actions, we only allow actions that inherit the TokenIssuanceStartAction.\n */\nexport type TokenIssuanceStartResponse = ActionableCloudEventResponse<TokenIssuanceStartAction>;\n\n/**\n * The main data interface related to the request.\n */\nexport interface TokenIssuanceStartData extends AuthenticationEventData {\n /** The main context of the data. */\n authenticationContext: AuthenticationEventContext;\n}\n\n/**\n * Client interface for data.\n */\nexport interface AuthenticationEventContextClient {\n /** The Ip Address */\n ip: string;\n /** Gets or sets the locale. */\n locale: string;\n /** Gets or sets the market. */\n market: string;\n}\n\n/**\n * ResourceServicePrincipal interface for data.\n */\nexport interface AuthenticationEventContextServicePrincipal {\n /** The identifier for the service principal. */\n id: string;\n /** The application identifier. */\n appId: string;\n /** The application display name. */\n appDisplayName: string;\n /** The display name. */\n displayName: string;\n}\n\n/**\n * User interface for data.\n */\nexport interface AuthenticationEventContextUser {\n /** The user's company name. */\n companyName: string;\n /** The user's country. */\n country: string;\n /** The user's display name. */\n displayName: string;\n /** The user's given name. */\n givenName: string;\n /** The user identifier. */\n id: string;\n /** The user's email address. */\n mail: string;\n /** The user's on premise SAM account name. */\n onPremisesSamAccountName: string;\n /** The user's on premise security identifier. */\n onPremisesSecurityIdentifier: string;\n /** The user's on premise principal name. */\n onPremiseUserPrincipalName: string;\n /** The user's preferred data location */\n preferredDataLocation: string;\n /** The user's preferred language. */\n preferredLanguage: string;\n /** The user's surname. */\n surname: string;\n /** The user's principal name. */\n userPrincipalName: string;\n /** The user type. */\n userType: string;\n}\n\n/**\n * Context interface for data.\n */\nexport interface AuthenticationEventContext {\n /** Unique identifier for the request. */\n correlationId: string;\n /** The client. */\n client: AuthenticationEventContextClient;\n /** The authorization protocol. */\n authenticationProtocol: \"OAUTH2.0\" | \"SAML\" | \"WS-FED\" | \"unknownFutureValue\" | undefined;\n /** The client service principal. */\n clientServicePrincipal: AuthenticationEventContextServicePrincipal;\n /** The resource service principal. */\n resourceServicePrincipal: AuthenticationEventContextServicePrincipal;\n /** Data pertaining to the user requesting a token. */\n user: AuthenticationEventContextUser;\n}\n\n/**\n * All actions for the token issuance start event should extended this interface, as it looks the correct action to the correct event.\n */\nexport interface TokenIssuanceStartAction extends AuthenticationEventAction {\n /** This will be the 'Name' of the action in the JSON. */\n actionType: string;\n}\n"]}
@@ -0,0 +1,3 @@
1
+ export { AuthenticationEventContext, AuthenticationEventContextClient, AuthenticationEventContextServicePrincipal, AuthenticationEventContextUser, TokenIssuanceStartData, TokenIssuanceStartRequest, TokenIssuanceStartResponse, TokenIssuanceStartAction, } from "./context.js";
2
+ export { ProvideClaimsForToken, TokenClaim, createProvideClaimsForToken } from "./actions.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tokenIssuanceStart/index.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,0BAA0B,EAC1B,gCAAgC,EAChC,0CAA0C,EAC1C,8BAA8B,EAC9B,sBAAsB,EACtB,yBAAyB,EACzB,0BAA0B,EAC1B,wBAAwB,GACzB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,qBAAqB,EAAE,UAAU,EAAE,2BAA2B,EAAE,MAAM,cAAc,CAAC"}
@@ -0,0 +1,4 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ export { createProvideClaimsForToken } from "./actions.js";
4
+ //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tokenIssuanceStart/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAYlC,OAAO,EAAqC,2BAA2B,EAAE,MAAM,WAAW,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport {\n AuthenticationEventContext,\n AuthenticationEventContextClient,\n AuthenticationEventContextServicePrincipal,\n AuthenticationEventContextUser,\n TokenIssuanceStartData,\n TokenIssuanceStartRequest,\n TokenIssuanceStartResponse,\n TokenIssuanceStartAction,\n} from \"./context\";\nexport { ProvideClaimsForToken, TokenClaim, createProvideClaimsForToken } from \"./actions\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tokenIssuanceStart/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAYlC,OAAO,EAAqC,2BAA2B,EAAE,MAAM,cAAc,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport {\n AuthenticationEventContext,\n AuthenticationEventContextClient,\n AuthenticationEventContextServicePrincipal,\n AuthenticationEventContextUser,\n TokenIssuanceStartData,\n TokenIssuanceStartRequest,\n TokenIssuanceStartResponse,\n TokenIssuanceStartAction,\n} from \"./context.js\";\nexport { ProvideClaimsForToken, TokenClaim, createProvideClaimsForToken } from \"./actions.js\";\n"]}
@@ -0,0 +1,2 @@
1
+ export declare const SDK_VERSION: string;
2
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,WAAW,EAAE,MAAuB,CAAC"}
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT License.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.SDK_VERSION = void 0;
6
+ exports.SDK_VERSION = "1.0.0-beta.1";
7
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAErB,QAAA,WAAW,GAAW,cAAc,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport const SDK_VERSION: string = \"1.0.0-beta.1\";\n"]}
@@ -0,0 +1,87 @@
1
+ /**
2
+ * Abstract base event interface to house common event request attributes.
3
+ */
4
+ export interface AuthenticationEventRequestCommon {
5
+ /** Related Type */
6
+ type: string;
7
+ /** The status of the current request, see RequestStatus. */
8
+ requestStatus: RequestStatus;
9
+ /** A user friendly message (containing errors), that the authentication event returns. */
10
+ statusMessage: string;
11
+ /** A dictionary of query string parameters */
12
+ queryParameters: Record<string, string>;
13
+ }
14
+ /**
15
+ * Event request interface extended the related response and event data (payload) objects.
16
+ */
17
+ export interface AuthenticationEventRequest<TResponse extends AuthenticationEventResponse, TData extends AuthenticationEventData> extends AuthenticationEventRequestCommon {
18
+ /** Related IEventResponse */
19
+ response: TResponse;
20
+ /** Related IEventData */
21
+ payload: TData;
22
+ }
23
+ /**
24
+ * Event request interface extended the related response and event data (payload) objects for cloud events.
25
+ */
26
+ export interface CloudEventRequest<TResponse extends AuthenticationEventResponse, TData extends AuthenticationEventData> extends AuthenticationEventRequest<TResponse, TData> {
27
+ /** Related Source */
28
+ source: string;
29
+ /** Related \@odata.type */
30
+ oDataType: string;
31
+ }
32
+ /**
33
+ * Event response interface that houses attributes returned from the authentication events trigger.
34
+ */
35
+ export interface AuthenticationEventResponse {
36
+ /** A template of the body of the expected response. */
37
+ body: string;
38
+ }
39
+ /**
40
+ * Event data interface pertaining to the expected payload, this interface houses the common attributes for data events.
41
+ */
42
+ export interface AuthenticationEventData {
43
+ /** Tenant the request is related to. */
44
+ tenantId: string;
45
+ /** Unique Id for the event. */
46
+ authenticationEventListenerId: string;
47
+ /** The unique internal Id of the registered custom extension. */
48
+ customAuthenticationExtensionId: string;
49
+ }
50
+ /**
51
+ * An interface that binds a response that has actions
52
+ */
53
+ export interface ActionableResponse<TEventAction extends AuthenticationEventAction> extends AuthenticationEventResponse {
54
+ /** Collections of actions pertaining to the event. */
55
+ actions: TEventAction[];
56
+ }
57
+ /**
58
+ * An interface for any responses that implement an cloud event payload and has actions on it.
59
+ */
60
+ export interface ActionableCloudEventResponse<TEventAction extends AuthenticationEventAction> extends ActionableResponse<TEventAction> {
61
+ /** Gets the Cloud Event \@odata.type. */
62
+ oDataType: string;
63
+ }
64
+ /**
65
+ * An interface representing an action for an event.
66
+ */
67
+ export interface AuthenticationEventAction {
68
+ /** Must be overridden, this will be the 'Name' of the action in the JSON. */
69
+ actionType: string;
70
+ }
71
+ /**
72
+ * The status of the request.
73
+ */
74
+ export type RequestStatus = "Failed" | "TokenInvalid" | "Successful";
75
+ /**
76
+ * Return the correctly formatted error
77
+ * */
78
+ export interface FailedRequest extends AuthenticationEventResponse {
79
+ error: string;
80
+ }
81
+ /**
82
+ * Helper function to create a files request
83
+ * @param error - string or exception
84
+ * @returns a valid FailedRequest object
85
+ */
86
+ export declare function createFailedRequest(error: unknown): FailedRequest;
87
+ //# sourceMappingURL=events.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/events.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,MAAM,WAAW,gCAAgC;IAC/C,mBAAmB;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,4DAA4D;IAC5D,aAAa,EAAE,aAAa,CAAC;IAC7B,0FAA0F;IAC1F,aAAa,EAAE,MAAM,CAAC;IACtB,8CAA8C;IAC9C,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACzC;AAED;;GAEG;AACH,MAAM,WAAW,0BAA0B,CACzC,SAAS,SAAS,2BAA2B,EAC7C,KAAK,SAAS,uBAAuB,CACrC,SAAQ,gCAAgC;IACxC,6BAA6B;IAC7B,QAAQ,EAAE,SAAS,CAAC;IACpB,yBAAyB;IACzB,OAAO,EAAE,KAAK,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB,CAChC,SAAS,SAAS,2BAA2B,EAC7C,KAAK,SAAS,uBAAuB,CACrC,SAAQ,0BAA0B,CAAC,SAAS,EAAE,KAAK,CAAC;IACpD,qBAAqB;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,2BAA2B;IAC3B,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C,uDAAuD;IACvD,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,wCAAwC;IACxC,QAAQ,EAAE,MAAM,CAAC;IACjB,+BAA+B;IAC/B,6BAA6B,EAAE,MAAM,CAAC;IACtC,iEAAiE;IACjE,+BAA+B,EAAE,MAAM,CAAC;CACzC;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB,CAAC,YAAY,SAAS,yBAAyB,CAChF,SAAQ,2BAA2B;IACnC,sDAAsD;IACtD,OAAO,EAAE,YAAY,EAAE,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,4BAA4B,CAAC,YAAY,SAAS,yBAAyB,CAC1F,SAAQ,kBAAkB,CAAC,YAAY,CAAC;IACxC,yCAAyC;IACzC,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC,6EAA6E;IAC7E,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,cAAc,GAAG,YAAY,CAAC;AAErE;;KAEK;AACL,MAAM,WAAW,aAAc,SAAQ,2BAA2B;IAEhE,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,aAAa,CAKjE"}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT License.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.createFailedRequest = createFailedRequest;
6
+ /**
7
+ * Helper function to create a files request
8
+ * @param error - string or exception
9
+ * @returns a valid FailedRequest object
10
+ */
11
+ function createFailedRequest(error) {
12
+ return {
13
+ body: "",
14
+ error: error instanceof Error ? error.message : String(error),
15
+ };
16
+ }
17
+ //# sourceMappingURL=events.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"events.js","sourceRoot":"","sources":["../../src/events.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AA0GlC,kDAKC;AAVD;;;;GAIG;AACH,SAAgB,mBAAmB,CAAC,KAAc;IAChD,OAAO;QACL,IAAI,EAAE,EAAE;QACR,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;KAC9D,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * Abstract base event interface to house common event request attributes.\n */\nexport interface AuthenticationEventRequestCommon {\n /** Related Type */\n type: string;\n /** The status of the current request, see RequestStatus. */\n requestStatus: RequestStatus;\n /** A user friendly message (containing errors), that the authentication event returns. */\n statusMessage: string;\n /** A dictionary of query string parameters */\n queryParameters: Record<string, string>;\n}\n\n/**\n * Event request interface extended the related response and event data (payload) objects.\n */\nexport interface AuthenticationEventRequest<\n TResponse extends AuthenticationEventResponse,\n TData extends AuthenticationEventData,\n> extends AuthenticationEventRequestCommon {\n /** Related IEventResponse */\n response: TResponse;\n /** Related IEventData */\n payload: TData;\n}\n\n/**\n * Event request interface extended the related response and event data (payload) objects for cloud events.\n */\nexport interface CloudEventRequest<\n TResponse extends AuthenticationEventResponse,\n TData extends AuthenticationEventData,\n> extends AuthenticationEventRequest<TResponse, TData> {\n /** Related Source */\n source: string;\n /** Related \\@odata.type */\n oDataType: string;\n}\n\n/**\n * Event response interface that houses attributes returned from the authentication events trigger.\n */\nexport interface AuthenticationEventResponse {\n /** A template of the body of the expected response. */\n body: string;\n}\n\n/**\n * Event data interface pertaining to the expected payload, this interface houses the common attributes for data events.\n */\nexport interface AuthenticationEventData {\n /** Tenant the request is related to. */\n tenantId: string;\n /** Unique Id for the event. */\n authenticationEventListenerId: string;\n /** The unique internal Id of the registered custom extension. */\n customAuthenticationExtensionId: string;\n}\n\n/**\n * An interface that binds a response that has actions\n */\nexport interface ActionableResponse<TEventAction extends AuthenticationEventAction>\n extends AuthenticationEventResponse {\n /** Collections of actions pertaining to the event. */\n actions: TEventAction[];\n}\n\n/**\n * An interface for any responses that implement an cloud event payload and has actions on it.\n */\nexport interface ActionableCloudEventResponse<TEventAction extends AuthenticationEventAction>\n extends ActionableResponse<TEventAction> {\n /** Gets the Cloud Event \\@odata.type. */\n oDataType: string;\n}\n\n/**\n * An interface representing an action for an event.\n */\nexport interface AuthenticationEventAction {\n /** Must be overridden, this will be the 'Name' of the action in the JSON. */\n actionType: string;\n}\n\n/**\n * The status of the request.\n */\nexport type RequestStatus = \"Failed\" | \"TokenInvalid\" | \"Successful\";\n\n/**\n * Return the correctly formatted error\n * */\nexport interface FailedRequest extends AuthenticationEventResponse {\n //* * The error that caused the request to fail. */\n error: string;\n}\n\n/**\n * Helper function to create a files request\n * @param error - string or exception\n * @returns a valid FailedRequest object\n */\nexport function createFailedRequest(error: unknown): FailedRequest {\n return {\n body: \"\",\n error: error instanceof Error ? error.message : String(error),\n };\n}\n"]}
@@ -0,0 +1,5 @@
1
+ export { FailedRequest, ActionableResponse, AuthenticationEventAction, AuthenticationEventData, AuthenticationEventRequest, AuthenticationEventRequestCommon, AuthenticationEventResponse, RequestStatus, CloudEventRequest, createFailedRequest, ActionableCloudEventResponse, } from "./events.js";
2
+ export { AuthenticationEventContext, AuthenticationEventContextClient, AuthenticationEventContextServicePrincipal, AuthenticationEventContextUser, TokenIssuanceStartData, TokenIssuanceStartRequest, TokenIssuanceStartResponse, } from "./tokenIssuanceStart/context.js";
3
+ export { ProvideClaimsForToken, TokenClaim, createProvideClaimsForToken, } from "./tokenIssuanceStart/actions.js";
4
+ export { TokenIssuanceStartAction } from "./tokenIssuanceStart/context.js";
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,yBAAyB,EACzB,uBAAuB,EACvB,0BAA0B,EAC1B,gCAAgC,EAChC,2BAA2B,EAC3B,aAAa,EACb,iBAAiB,EACjB,mBAAmB,EACnB,4BAA4B,GAC7B,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,0BAA0B,EAC1B,gCAAgC,EAChC,0CAA0C,EAC1C,8BAA8B,EAC9B,sBAAsB,EACtB,yBAAyB,EACzB,0BAA0B,GAC3B,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,qBAAqB,EACrB,UAAU,EACV,2BAA2B,GAC5B,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC"}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT License.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.createProvideClaimsForToken = exports.createFailedRequest = void 0;
6
+ var events_js_1 = require("./events.js");
7
+ Object.defineProperty(exports, "createFailedRequest", { enumerable: true, get: function () { return events_js_1.createFailedRequest; } });
8
+ var actions_js_1 = require("./tokenIssuanceStart/actions.js");
9
+ Object.defineProperty(exports, "createProvideClaimsForToken", { enumerable: true, get: function () { return actions_js_1.createProvideClaimsForToken; } });
10
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,yCAYqB;AAFnB,gHAAA,mBAAmB,OAAA;AAarB,8DAIyC;AADvC,yHAAA,2BAA2B,OAAA","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport {\n FailedRequest,\n ActionableResponse,\n AuthenticationEventAction,\n AuthenticationEventData,\n AuthenticationEventRequest,\n AuthenticationEventRequestCommon,\n AuthenticationEventResponse,\n RequestStatus,\n CloudEventRequest,\n createFailedRequest,\n ActionableCloudEventResponse,\n} from \"./events.js\";\n\nexport {\n AuthenticationEventContext,\n AuthenticationEventContextClient,\n AuthenticationEventContextServicePrincipal,\n AuthenticationEventContextUser,\n TokenIssuanceStartData,\n TokenIssuanceStartRequest,\n TokenIssuanceStartResponse,\n} from \"./tokenIssuanceStart/context.js\";\nexport {\n ProvideClaimsForToken,\n TokenClaim,\n createProvideClaimsForToken,\n} from \"./tokenIssuanceStart/actions.js\";\n\nexport { TokenIssuanceStartAction } from \"./tokenIssuanceStart/context.js\";\n"]}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * The \@azure/logger configuration for this package.
3
+ *
4
+ * @internal
5
+ */
6
+ export declare const logger: import("@azure/logger").AzureLogger;
7
+ //# sourceMappingURL=logger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/logger.ts"],"names":[],"mappings":"AAKA;;;;GAIG;AACH,eAAO,MAAM,MAAM,qCAAwD,CAAC"}
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT License.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.logger = void 0;
6
+ const logger_1 = require("@azure/logger");
7
+ /**
8
+ * The \@azure/logger configuration for this package.
9
+ *
10
+ * @internal
11
+ */
12
+ exports.logger = (0, logger_1.createClientLogger)("functions-authentication-events");
13
+ //# sourceMappingURL=logger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/logger.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,0CAAmD;AAEnD;;;;GAIG;AACU,QAAA,MAAM,GAAG,IAAA,2BAAkB,EAAC,iCAAiC,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { createClientLogger } from \"@azure/logger\";\n\n/**\n * The \\@azure/logger configuration for this package.\n *\n * @internal\n */\nexport const logger = createClientLogger(\"functions-authentication-events\");\n"]}
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "commonjs"
3
+ }
@@ -0,0 +1,17 @@
1
+ import type { TokenIssuanceStartAction } from "./context.js";
2
+ /**
3
+ * An Interface for the Provide Claims for token action.
4
+ */
5
+ export interface ProvideClaimsForToken extends TokenIssuanceStartAction {
6
+ /** The 'Name' of the action in the JSON. */
7
+ actionType: "microsoft.graph.ProvideClaimsForToken";
8
+ /** Collection of claims to add to the token. */
9
+ claims: TokenClaim;
10
+ }
11
+ /** Helper function to create a provider claims for token */
12
+ export declare function createProvideClaimsForToken(claims: TokenClaim): ProvideClaimsForToken;
13
+ /**
14
+ * An type representing a claim.
15
+ */
16
+ export type TokenClaim = Record<string, string | string[]>;
17
+ //# sourceMappingURL=actions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../src/tokenIssuanceStart/actions.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AAE7D;;GAEG;AACH,MAAM,WAAW,qBAAsB,SAAQ,wBAAwB;IACrE,4CAA4C;IAC5C,UAAU,EAAE,uCAAuC,CAAC;IACpD,gDAAgD;IAChD,MAAM,EAAE,UAAU,CAAC;CAEpB;AAED,4DAA4D;AAC5D,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,UAAU,GAAG,qBAAqB,CAKrF;AAED;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC,CAAC"}
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT License.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.createProvideClaimsForToken = createProvideClaimsForToken;
6
+ /** Helper function to create a provider claims for token */
7
+ function createProvideClaimsForToken(claims) {
8
+ return {
9
+ actionType: "microsoft.graph.ProvideClaimsForToken",
10
+ claims: claims,
11
+ };
12
+ }
13
+ //# sourceMappingURL=actions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"actions.js","sourceRoot":"","sources":["../../../src/tokenIssuanceStart/actions.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAgBlC,kEAKC;AAND,4DAA4D;AAC5D,SAAgB,2BAA2B,CAAC,MAAkB;IAC5D,OAAO;QACL,UAAU,EAAE,uCAAuC;QACnD,MAAM,EAAE,MAAM;KACf,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { TokenIssuanceStartAction } from \"./context.js\";\n\n/**\n * An Interface for the Provide Claims for token action.\n */\nexport interface ProvideClaimsForToken extends TokenIssuanceStartAction {\n /** The 'Name' of the action in the JSON. */\n actionType: \"microsoft.graph.ProvideClaimsForToken\";\n /** Collection of claims to add to the token. */\n claims: TokenClaim;\n /** Helper constructor to easily add claims to the action. */\n}\n\n/** Helper function to create a provider claims for token */\nexport function createProvideClaimsForToken(claims: TokenClaim): ProvideClaimsForToken {\n return {\n actionType: \"microsoft.graph.ProvideClaimsForToken\",\n claims: claims,\n };\n}\n\n/**\n * An type representing a claim.\n */\nexport type TokenClaim = Record<string, string | string[]>;\n"]}
@@ -0,0 +1,105 @@
1
+ /**
2
+ * Container file for all interfaces that pertain to the OnTokenIssuanceStart event API schema version 10-01-2021-preview.
3
+ */
4
+ import type { ActionableCloudEventResponse, AuthenticationEventAction, AuthenticationEventData, CloudEventRequest } from "../events.js";
5
+ /**
6
+ * The main request interface, this will relate it's response and payload.
7
+ */
8
+ export interface TokenIssuanceStartRequest extends CloudEventRequest<TokenIssuanceStartResponse, TokenIssuanceStartData> {
9
+ /** A dictionary of token claims. */
10
+ tokenClaims?: Record<string, string>;
11
+ }
12
+ /**
13
+ * The main response interface that is related to the request, this extends IActionable as the response
14
+ * contains actions, we only allow actions that inherit the TokenIssuanceStartAction.
15
+ */
16
+ export type TokenIssuanceStartResponse = ActionableCloudEventResponse<TokenIssuanceStartAction>;
17
+ /**
18
+ * The main data interface related to the request.
19
+ */
20
+ export interface TokenIssuanceStartData extends AuthenticationEventData {
21
+ /** The main context of the data. */
22
+ authenticationContext: AuthenticationEventContext;
23
+ }
24
+ /**
25
+ * Client interface for data.
26
+ */
27
+ export interface AuthenticationEventContextClient {
28
+ /** The Ip Address */
29
+ ip: string;
30
+ /** Gets or sets the locale. */
31
+ locale: string;
32
+ /** Gets or sets the market. */
33
+ market: string;
34
+ }
35
+ /**
36
+ * ResourceServicePrincipal interface for data.
37
+ */
38
+ export interface AuthenticationEventContextServicePrincipal {
39
+ /** The identifier for the service principal. */
40
+ id: string;
41
+ /** The application identifier. */
42
+ appId: string;
43
+ /** The application display name. */
44
+ appDisplayName: string;
45
+ /** The display name. */
46
+ displayName: string;
47
+ }
48
+ /**
49
+ * User interface for data.
50
+ */
51
+ export interface AuthenticationEventContextUser {
52
+ /** The user's company name. */
53
+ companyName: string;
54
+ /** The user's country. */
55
+ country: string;
56
+ /** The user's display name. */
57
+ displayName: string;
58
+ /** The user's given name. */
59
+ givenName: string;
60
+ /** The user identifier. */
61
+ id: string;
62
+ /** The user's email address. */
63
+ mail: string;
64
+ /** The user's on premise SAM account name. */
65
+ onPremisesSamAccountName: string;
66
+ /** The user's on premise security identifier. */
67
+ onPremisesSecurityIdentifier: string;
68
+ /** The user's on premise principal name. */
69
+ onPremiseUserPrincipalName: string;
70
+ /** The user's preferred data location */
71
+ preferredDataLocation: string;
72
+ /** The user's preferred language. */
73
+ preferredLanguage: string;
74
+ /** The user's surname. */
75
+ surname: string;
76
+ /** The user's principal name. */
77
+ userPrincipalName: string;
78
+ /** The user type. */
79
+ userType: string;
80
+ }
81
+ /**
82
+ * Context interface for data.
83
+ */
84
+ export interface AuthenticationEventContext {
85
+ /** Unique identifier for the request. */
86
+ correlationId: string;
87
+ /** The client. */
88
+ client: AuthenticationEventContextClient;
89
+ /** The authorization protocol. */
90
+ authenticationProtocol: "OAUTH2.0" | "SAML" | "WS-FED" | "unknownFutureValue" | undefined;
91
+ /** The client service principal. */
92
+ clientServicePrincipal: AuthenticationEventContextServicePrincipal;
93
+ /** The resource service principal. */
94
+ resourceServicePrincipal: AuthenticationEventContextServicePrincipal;
95
+ /** Data pertaining to the user requesting a token. */
96
+ user: AuthenticationEventContextUser;
97
+ }
98
+ /**
99
+ * All actions for the token issuance start event should extended this interface, as it looks the correct action to the correct event.
100
+ */
101
+ export interface TokenIssuanceStartAction extends AuthenticationEventAction {
102
+ /** This will be the 'Name' of the action in the JSON. */
103
+ actionType: string;
104
+ }
105
+ //# sourceMappingURL=context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/tokenIssuanceStart/context.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,OAAO,KAAK,EACV,4BAA4B,EAC5B,yBAAyB,EACzB,uBAAuB,EACvB,iBAAiB,EAClB,MAAM,cAAc,CAAC;AAEtB;;GAEG;AACH,MAAM,WAAW,yBACf,SAAQ,iBAAiB,CAAC,0BAA0B,EAAE,sBAAsB,CAAC;IAC7E,oCAAoC;IACpC,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACtC;AAED;;;GAGG;AACH,MAAM,MAAM,0BAA0B,GAAG,4BAA4B,CAAC,wBAAwB,CAAC,CAAC;AAEhG;;GAEG;AACH,MAAM,WAAW,sBAAuB,SAAQ,uBAAuB;IACrE,oCAAoC;IACpC,qBAAqB,EAAE,0BAA0B,CAAC;CACnD;AAED;;GAEG;AACH,MAAM,WAAW,gCAAgC;IAC/C,qBAAqB;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,+BAA+B;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,+BAA+B;IAC/B,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,0CAA0C;IACzD,gDAAgD;IAChD,EAAE,EAAE,MAAM,CAAC;IACX,kCAAkC;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,oCAAoC;IACpC,cAAc,EAAE,MAAM,CAAC;IACvB,wBAAwB;IACxB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC7C,+BAA+B;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,0BAA0B;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,+BAA+B;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,6BAA6B;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,2BAA2B;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,gCAAgC;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,8CAA8C;IAC9C,wBAAwB,EAAE,MAAM,CAAC;IACjC,iDAAiD;IACjD,4BAA4B,EAAE,MAAM,CAAC;IACrC,4CAA4C;IAC5C,0BAA0B,EAAE,MAAM,CAAC;IACnC,yCAAyC;IACzC,qBAAqB,EAAE,MAAM,CAAC;IAC9B,qCAAqC;IACrC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,0BAA0B;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,iCAAiC;IACjC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,qBAAqB;IACrB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC,yCAAyC;IACzC,aAAa,EAAE,MAAM,CAAC;IACtB,kBAAkB;IAClB,MAAM,EAAE,gCAAgC,CAAC;IACzC,kCAAkC;IAClC,sBAAsB,EAAE,UAAU,GAAG,MAAM,GAAG,QAAQ,GAAG,oBAAoB,GAAG,SAAS,CAAC;IAC1F,oCAAoC;IACpC,sBAAsB,EAAE,0CAA0C,CAAC;IACnE,sCAAsC;IACtC,wBAAwB,EAAE,0CAA0C,CAAC;IACrE,sDAAsD;IACtD,IAAI,EAAE,8BAA8B,CAAC;CACtC;AAED;;GAEG;AACH,MAAM,WAAW,wBAAyB,SAAQ,yBAAyB;IACzE,yDAAyD;IACzD,UAAU,EAAE,MAAM,CAAC;CACpB"}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT License.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ //# sourceMappingURL=context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.js","sourceRoot":"","sources":["../../../src/tokenIssuanceStart/context.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * Container file for all interfaces that pertain to the OnTokenIssuanceStart event API schema version 10-01-2021-preview.\n */\nimport type {\n ActionableCloudEventResponse,\n AuthenticationEventAction,\n AuthenticationEventData,\n CloudEventRequest,\n} from \"../events.js\";\n\n/**\n * The main request interface, this will relate it's response and payload.\n */\nexport interface TokenIssuanceStartRequest\n extends CloudEventRequest<TokenIssuanceStartResponse, TokenIssuanceStartData> {\n /** A dictionary of token claims. */\n tokenClaims?: Record<string, string>;\n}\n\n/**\n * The main response interface that is related to the request, this extends IActionable as the response\n * contains actions, we only allow actions that inherit the TokenIssuanceStartAction.\n */\nexport type TokenIssuanceStartResponse = ActionableCloudEventResponse<TokenIssuanceStartAction>;\n\n/**\n * The main data interface related to the request.\n */\nexport interface TokenIssuanceStartData extends AuthenticationEventData {\n /** The main context of the data. */\n authenticationContext: AuthenticationEventContext;\n}\n\n/**\n * Client interface for data.\n */\nexport interface AuthenticationEventContextClient {\n /** The Ip Address */\n ip: string;\n /** Gets or sets the locale. */\n locale: string;\n /** Gets or sets the market. */\n market: string;\n}\n\n/**\n * ResourceServicePrincipal interface for data.\n */\nexport interface AuthenticationEventContextServicePrincipal {\n /** The identifier for the service principal. */\n id: string;\n /** The application identifier. */\n appId: string;\n /** The application display name. */\n appDisplayName: string;\n /** The display name. */\n displayName: string;\n}\n\n/**\n * User interface for data.\n */\nexport interface AuthenticationEventContextUser {\n /** The user's company name. */\n companyName: string;\n /** The user's country. */\n country: string;\n /** The user's display name. */\n displayName: string;\n /** The user's given name. */\n givenName: string;\n /** The user identifier. */\n id: string;\n /** The user's email address. */\n mail: string;\n /** The user's on premise SAM account name. */\n onPremisesSamAccountName: string;\n /** The user's on premise security identifier. */\n onPremisesSecurityIdentifier: string;\n /** The user's on premise principal name. */\n onPremiseUserPrincipalName: string;\n /** The user's preferred data location */\n preferredDataLocation: string;\n /** The user's preferred language. */\n preferredLanguage: string;\n /** The user's surname. */\n surname: string;\n /** The user's principal name. */\n userPrincipalName: string;\n /** The user type. */\n userType: string;\n}\n\n/**\n * Context interface for data.\n */\nexport interface AuthenticationEventContext {\n /** Unique identifier for the request. */\n correlationId: string;\n /** The client. */\n client: AuthenticationEventContextClient;\n /** The authorization protocol. */\n authenticationProtocol: \"OAUTH2.0\" | \"SAML\" | \"WS-FED\" | \"unknownFutureValue\" | undefined;\n /** The client service principal. */\n clientServicePrincipal: AuthenticationEventContextServicePrincipal;\n /** The resource service principal. */\n resourceServicePrincipal: AuthenticationEventContextServicePrincipal;\n /** Data pertaining to the user requesting a token. */\n user: AuthenticationEventContextUser;\n}\n\n/**\n * All actions for the token issuance start event should extended this interface, as it looks the correct action to the correct event.\n */\nexport interface TokenIssuanceStartAction extends AuthenticationEventAction {\n /** This will be the 'Name' of the action in the JSON. */\n actionType: string;\n}\n"]}
@@ -0,0 +1,3 @@
1
+ export { AuthenticationEventContext, AuthenticationEventContextClient, AuthenticationEventContextServicePrincipal, AuthenticationEventContextUser, TokenIssuanceStartData, TokenIssuanceStartRequest, TokenIssuanceStartResponse, TokenIssuanceStartAction, } from "./context.js";
2
+ export { ProvideClaimsForToken, TokenClaim, createProvideClaimsForToken } from "./actions.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tokenIssuanceStart/index.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,0BAA0B,EAC1B,gCAAgC,EAChC,0CAA0C,EAC1C,8BAA8B,EAC9B,sBAAsB,EACtB,yBAAyB,EACzB,0BAA0B,EAC1B,wBAAwB,GACzB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,qBAAqB,EAAE,UAAU,EAAE,2BAA2B,EAAE,MAAM,cAAc,CAAC"}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT License.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.createProvideClaimsForToken = void 0;
6
+ var actions_js_1 = require("./actions.js");
7
+ Object.defineProperty(exports, "createProvideClaimsForToken", { enumerable: true, get: function () { return actions_js_1.createProvideClaimsForToken; } });
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tokenIssuanceStart/index.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAYlC,2CAA8F;AAAlD,yHAAA,2BAA2B,OAAA","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport {\n AuthenticationEventContext,\n AuthenticationEventContextClient,\n AuthenticationEventContextServicePrincipal,\n AuthenticationEventContextUser,\n TokenIssuanceStartData,\n TokenIssuanceStartRequest,\n TokenIssuanceStartResponse,\n TokenIssuanceStartAction,\n} from \"./context.js\";\nexport { ProvideClaimsForToken, TokenClaim, createProvideClaimsForToken } from \"./actions.js\";\n"]}
@@ -1,11 +1,11 @@
1
- // This file is read by tools that parse documentation comments conforming to the TSDoc standard.
2
- // It should be published with your NPM package. It should not be tracked by Git.
3
- {
4
- "tsdocVersion": "0.12",
5
- "toolPackages": [
6
- {
7
- "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.33.5"
9
- }
10
- ]
11
- }
1
+ // This file is read by tools that parse documentation comments conforming to the TSDoc standard.
2
+ // It should be published with your NPM package. It should not be tracked by Git.
3
+ {
4
+ "tsdocVersion": "0.12",
5
+ "toolPackages": [
6
+ {
7
+ "packageName": "@microsoft/api-extractor",
8
+ "packageVersion": "7.52.10"
9
+ }
10
+ ]
11
+ }
@@ -0,0 +1,2 @@
1
+ export declare const SDK_VERSION: string;
2
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,WAAW,EAAE,MAAuB,CAAC"}
@@ -0,0 +1,4 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ export const SDK_VERSION = "1.0.0-beta.1";
4
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,MAAM,CAAC,MAAM,WAAW,GAAW,cAAc,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport const SDK_VERSION: string = \"1.0.0-beta.1\";\n"]}