зеркало из https://github.com/Azure/ms-rest-js.git
Merge pull request #361 from kalyanaj/master
Added domainCredentials for authentication to EventGrid domains.
This commit is contained in:
Коммит
4c755ad5c8
|
@ -1,5 +1,8 @@
|
|||
# Changelog
|
||||
|
||||
## 1.8.13 - 2019-06-12
|
||||
- Added DomainCredentials class for providing credentials to publish to an Azure EventGrid domain.
|
||||
|
||||
## 1.8.12 - 2019-06-07
|
||||
- Added back the workaround of uppercasing method names otherwise axios causes issues with signing requests for storage data plane libraries.
|
||||
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
|
||||
import { ApiKeyCredentials, ApiKeyCredentialOptions } from "./apiKeyCredentials";
|
||||
|
||||
export class DomainCredentials extends ApiKeyCredentials {
|
||||
/**
|
||||
* Creates a new EventGrid DomainCredentials object.
|
||||
*
|
||||
* @constructor
|
||||
* @param {string} domainKey The EventGrid domain key
|
||||
*/
|
||||
constructor(domainKey: string) {
|
||||
if (!domainKey || (domainKey && typeof domainKey !== "string")) {
|
||||
throw new Error("domainKey cannot be null or undefined and must be of type string.");
|
||||
}
|
||||
const options: ApiKeyCredentialOptions = {
|
||||
inHeader: {
|
||||
"aeg-sas-key": domainKey
|
||||
}
|
||||
};
|
||||
super(options);
|
||||
}
|
||||
}
|
|
@ -47,4 +47,5 @@ export { BasicAuthenticationCredentials } from "./credentials/basicAuthenticatio
|
|||
export { ApiKeyCredentials, ApiKeyCredentialOptions } from "./credentials/apiKeyCredentials";
|
||||
export { ServiceClientCredentials } from "./credentials/serviceClientCredentials";
|
||||
export { TopicCredentials } from "./credentials/topicCredentials";
|
||||
export { DomainCredentials } from "./credentials/domainCredentials";
|
||||
export { Authenticator } from "./credentials/credentials";
|
||||
|
|
|
@ -7,7 +7,7 @@ export const Constants = {
|
|||
* @const
|
||||
* @type {string}
|
||||
*/
|
||||
msRestVersion: "1.8.12",
|
||||
msRestVersion: "1.8.13",
|
||||
|
||||
/**
|
||||
* Specifies HTTP.
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
"email": "azsdkteam@microsoft.com",
|
||||
"url": "https://github.com/Azure/ms-rest-js"
|
||||
},
|
||||
"version": "1.8.12",
|
||||
"version": "1.8.13",
|
||||
"description": "Isomorphic client Runtime for Typescript/node.js/browser javascript client libraries generated using AutoRest",
|
||||
"tags": [
|
||||
"isomorphic",
|
||||
|
|
Загрузка…
Ссылка в новой задаче