1 | /*! firebase-admin v10.0.0 */
|
2 | ;
|
3 | /*!
|
4 | * @license
|
5 | * Copyright 2017 Google Inc.
|
6 | *
|
7 | * Licensed under the Apache License, Version 2.0 (the "License");
|
8 | * you may not use this file except in compliance with the License.
|
9 | * You may obtain a copy of the License at
|
10 | *
|
11 | * http://www.apache.org/licenses/LICENSE-2.0
|
12 | *
|
13 | * Unless required by applicable law or agreed to in writing, software
|
14 | * distributed under the License is distributed on an "AS IS" BASIS,
|
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16 | * See the License for the specific language governing permissions and
|
17 | * limitations under the License.
|
18 | */
|
19 | var __extends = (this && this.__extends) || (function () {
|
20 | var extendStatics = function (d, b) {
|
21 | extendStatics = Object.setPrototypeOf ||
|
22 | ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
23 | function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
24 | return extendStatics(d, b);
|
25 | };
|
26 | return function (d, b) {
|
27 | extendStatics(d, b);
|
28 | function __() { this.constructor = d; }
|
29 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
30 | };
|
31 | })();
|
32 | Object.defineProperty(exports, "__esModule", { value: true });
|
33 | exports.Auth = void 0;
|
34 | var auth_api_request_1 = require("./auth-api-request");
|
35 | var tenant_manager_1 = require("./tenant-manager");
|
36 | var base_auth_1 = require("./base-auth");
|
37 | /**
|
38 | * Auth service bound to the provided app.
|
39 | * An Auth instance can have multiple tenants.
|
40 | */
|
41 | var Auth = /** @class */ (function (_super) {
|
42 | __extends(Auth, _super);
|
43 | /**
|
44 | * @param app - The app for this Auth service.
|
45 | * @constructor
|
46 | * @internal
|
47 | */
|
48 | function Auth(app) {
|
49 | var _this = _super.call(this, app, new auth_api_request_1.AuthRequestHandler(app)) || this;
|
50 | _this.app_ = app;
|
51 | _this.tenantManager_ = new tenant_manager_1.TenantManager(app);
|
52 | return _this;
|
53 | }
|
54 | Object.defineProperty(Auth.prototype, "app", {
|
55 | /**
|
56 | * Returns the app associated with this Auth instance.
|
57 | *
|
58 | * @returns The app associated with this Auth instance.
|
59 | */
|
60 | get: function () {
|
61 | return this.app_;
|
62 | },
|
63 | enumerable: false,
|
64 | configurable: true
|
65 | });
|
66 | /**
|
67 | * Returns the tenant manager instance associated with the current project.
|
68 | *
|
69 | * @returns The tenant manager instance associated with the current project.
|
70 | */
|
71 | Auth.prototype.tenantManager = function () {
|
72 | return this.tenantManager_;
|
73 | };
|
74 | return Auth;
|
75 | }(base_auth_1.BaseAuth));
|
76 | exports.Auth = Auth;
|