Skip to content

Commit 58fe7ef

Browse files
committed
Merge branch 'mfa-totp' of https://github.com/firebase/firebase-admin-python into mfa-totp
2 parents e542f91 + 4bc2c83 commit 58fe7ef

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

firebase_admin/multi_factor_config_mgt.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# limitations under the License.
1414
"""Firebase multifactor configuration management module.
1515
16-
This module contains functions for managing various multifactor configurations at
16+
This module contains functions for managing multifactor auth configuration at
1717
the project and tenant level.
1818
"""
1919
from enum import Enum
@@ -94,7 +94,7 @@ def adjacent_intervals(self):
9494

9595

9696
class TOTPProviderConfig:
97-
"""Represents a TOTP Provider Configuration to be specified for a tenant or project."""
97+
"""A tenant or project's TOTP provider configuration."""
9898

9999
def __init__(self, adjacent_intervals: int = None):
100100
self.adjacent_intervals: int = adjacent_intervals
@@ -106,7 +106,7 @@ def to_dict(self) -> dict:
106106
return data
107107

108108
def validate(self):
109-
"""Validates a given totp_provider_config object.
109+
"""Validates the configuration.
110110
111111
Raises:
112112
ValueError: In case of an unsuccessful validation.
@@ -133,8 +133,8 @@ def build_server_request(self):
133133

134134

135135
class ProviderConfig:
136-
"""Represents a provider configuration for tenant or project.
137-
Currently only TOTP can be configured"""
136+
"""A tenant or project's multifactor provider configuration.
137+
Currently, only TOTP can be configured."""
138138

139139
class State(Enum):
140140
ENABLED = 'ENABLED'
@@ -155,7 +155,7 @@ def to_dict(self) -> dict:
155155
return data
156156

157157
def validate(self):
158-
"""Validates a provider_config object.
158+
"""Validates the provider configuration.
159159
160160
Raises:
161161
ValueError: In case of an unsuccessful validation.
@@ -184,8 +184,7 @@ def build_server_request(self):
184184

185185

186186
class MultiFactorConfig:
187-
"""Represents a multi factor configuration for tenant or project
188-
"""
187+
"""A tenant or project's multi factor configuration."""
189188

190189
def __init__(self,
191190
provider_configs: List[ProviderConfig] = None):
@@ -199,7 +198,7 @@ def to_dict(self) -> dict:
199198
return data
200199

201200
def validate(self):
202-
"""Validates a given multi_factor_config object.
201+
"""Validates the configuration.
203202
204203
Raises:
205204
ValueError: In case of an unsuccessful validation.

firebase_admin/project_config_mgt.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# limitations under the License.
1414
"""Firebase project configuration management module.
1515
16-
This module contains functions for managing various project operations like update and create
16+
This module contains functions for managing projects.
1717
"""
1818

1919
import requests
@@ -52,9 +52,10 @@ def get_project_config(app=None):
5252
return project_config_mgt_service.get_project_config()
5353

5454
def update_project_config(multi_factor_config: MultiFactorConfig = None, app=None):
55-
"""Update the Project Config with the given options.
55+
"""Update the project config with the given options.
56+
5657
Args:
57-
multi_factor_config: Updated Multi Factor Authentication configuration
58+
multi_factor_config: Updated multi-factor authentication configuration
5859
(optional)
5960
app: An App instance (optional).
6061
Returns:

0 commit comments

Comments
 (0)