UNPKG

@sitecore/sc-contenthub-webclient-sdk

Version:

Sitecore Content Hub WebClient SDK.

42 lines 1.99 kB
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = (this && this.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; import { JsonObject, JsonProperty } from "ta-json"; import Guard from "../guard"; import { OAuthGrantBase } from "./oauth-grant-base"; import { OAuthGrantType } from "./oauth-grant-type"; let OAuthPasswordGrant = class OAuthPasswordGrant extends OAuthGrantBase { constructor(clientId, clientSecret, username, password) { super(clientId, clientSecret); this.type = OAuthGrantType.Password; Guard.notNullOrUndefined(username); Guard.notNullOrUndefined(password); this.username = username; this.password = password; } }; __decorate([ JsonProperty("grant_type"), __metadata("design:type", String) ], OAuthPasswordGrant.prototype, "type", void 0); __decorate([ JsonProperty("username"), __metadata("design:type", String) ], OAuthPasswordGrant.prototype, "username", void 0); __decorate([ JsonProperty("password"), __metadata("design:type", String) ], OAuthPasswordGrant.prototype, "password", void 0); OAuthPasswordGrant = __decorate([ JsonObject(), __metadata("design:paramtypes", [String, String, String, String]) ], OAuthPasswordGrant); export default OAuthPasswordGrant; export { OAuthPasswordGrant }; //# sourceMappingURL=oauth-password-grant.js.map