13
13
# limitations under the License.
14
14
"""Firebase multifactor configuration management module.
15
15
16
- This module contains functions for managing various multifactor configurations at
16
+ This module contains functions for managing multifactor auth configuration at
17
17
the project and tenant level.
18
18
"""
19
19
from enum import Enum
@@ -94,7 +94,7 @@ def adjacent_intervals(self):
94
94
95
95
96
96
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 ."""
98
98
99
99
def __init__ (self , adjacent_intervals : int = None ):
100
100
self .adjacent_intervals : int = adjacent_intervals
@@ -106,7 +106,7 @@ def to_dict(self) -> dict:
106
106
return data
107
107
108
108
def validate (self ):
109
- """Validates a given totp_provider_config object .
109
+ """Validates the configuration .
110
110
111
111
Raises:
112
112
ValueError: In case of an unsuccessful validation.
@@ -133,8 +133,8 @@ def build_server_request(self):
133
133
134
134
135
135
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. """
138
138
139
139
class State (Enum ):
140
140
ENABLED = 'ENABLED'
@@ -155,7 +155,7 @@ def to_dict(self) -> dict:
155
155
return data
156
156
157
157
def validate (self ):
158
- """Validates a provider_config object .
158
+ """Validates the provider configuration .
159
159
160
160
Raises:
161
161
ValueError: In case of an unsuccessful validation.
@@ -184,8 +184,7 @@ def build_server_request(self):
184
184
185
185
186
186
class MultiFactorConfig :
187
- """Represents a multi factor configuration for tenant or project
188
- """
187
+ """A tenant or project's multi factor configuration."""
189
188
190
189
def __init__ (self ,
191
190
provider_configs : List [ProviderConfig ] = None ):
@@ -199,7 +198,7 @@ def to_dict(self) -> dict:
199
198
return data
200
199
201
200
def validate (self ):
202
- """Validates a given multi_factor_config object .
201
+ """Validates the configuration .
203
202
204
203
Raises:
205
204
ValueError: In case of an unsuccessful validation.
0 commit comments