Skip to content

Address recaptcha tech review feedback #1685

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/auth/auth-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1455,13 +1455,13 @@ export class OIDCConfig implements OIDCAuthProviderConfig {
/**
* Enforcement state of reCAPTCHA protection.
* - 'OFF': Unenforced.
* - 'AUDIT': Assessment is created but result is not used to enforce.
* - 'ENFORCE': Assessment is created and result is used to enforce.
* - 'AUDIT': Create assessment but don't enforce the result.
* - 'ENFORCE': Create assessment and enforce the result.
*/
export type RecaptchaProviderEnforcementState = 'OFF' | 'AUDIT' | 'ENFORCE';

/**
* The actions for reCAPTCHA-protected requests.
* The actions to take for reCAPTCHA-protected requests.
* - 'BLOCK': The reCAPTCHA-protected request will be blocked.
*/
export type RecaptchaAction = 'BLOCK';
Expand All @@ -1481,7 +1481,7 @@ export interface RecaptchaManagedRule {
}

/**
* The key's platform type: only web supported now.
* The key's platform type: only web is currently supported.
*/
export type RecaptchaKeyClientType = 'WEB';

Expand All @@ -1508,7 +1508,7 @@ export interface RecaptchaKey {
*/
export interface RecaptchaConfig {
/**
* The enforcement state of email password provider.
* The enforcement state of the email password provider.
*/
emailPasswordEnforcementState?: RecaptchaProviderEnforcementState;
/**
Expand Down
5 changes: 1 addition & 4 deletions src/auth/project-config-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,7 @@ import {
} from './auth-api-request';

/**
* Defines the project config manager used to help manage project config related operations.
* This includes:
* <ul>
* <li>The ability to update and get project config.</li>
* Manages (gets and updates) the current project config.
*/
export class ProjectConfigManager {
private readonly authRequestHandler: AuthRequestHandler;
Expand Down
22 changes: 11 additions & 11 deletions src/auth/project-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,25 +25,25 @@ import {
*/
export interface UpdateProjectConfigRequest {
/**
* The recaptcha configuration to update on the project.
* By enabling reCAPTCHA Enterprise Integration you are
* agreeing to reCAPTCHA Enterprise
* The reCAPTCHA configuration to update on the project.
* By enabling reCAPTCHA Enterprise integration, you are
* agreeing to the reCAPTCHA Enterprise
* {@link https://cloud.google.com/terms/service-terms | Term of Service}.
*/
recaptchaConfig?: RecaptchaConfig;
}

/**
* Response received from get/update project config.
* We are only exposing the recaptcha config for now.
* Response received when getting or updating the project config.
* Currently only includes the reCAPTCHA config.
*/
export interface ProjectConfigServerResponse {
recaptchaConfig?: RecaptchaConfig;
}

/**
* Request sent to update project config.
* We are only updating the recaptcha config for now.
* Request to update the project config.
* Currently only includes the reCAPTCHA config.
*/
export interface ProjectConfigClientRequest {
recaptchaConfig?: RecaptchaConfig;
Expand All @@ -54,9 +54,9 @@ export interface ProjectConfigClientRequest {
*/
export class ProjectConfig {
/**
* The recaptcha configuration to update on the project config.
* By enabling reCAPTCHA Enterprise Integration you are
* agreeing to reCAPTCHA Enterprise
* The reCAPTCHA configuration to update on the project.
* By enabling reCAPTCHA Enterprise integration, you are
* agreeing to the reCAPTCHA Enterprise
* {@link https://cloud.google.com/terms/service-terms | Term of Service}.
*/
private readonly recaptchaConfig_?: RecaptchaAuthConfig;
Expand Down Expand Up @@ -103,7 +103,7 @@ export class ProjectConfig {
}

/**
* The recaptcha configuration.
* The reCAPTCHA configuration.
*/
get recaptchaConfig(): RecaptchaConfig | undefined {
return this.recaptchaConfig_;
Expand Down
6 changes: 3 additions & 3 deletions src/auth/tenant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ export interface UpdateTenantRequest {
testPhoneNumbers?: { [phoneNumber: string]: string } | null;

/**
* The recaptcha configuration to update on the tenant.
* By enabling reCAPTCHA Enterprise Integration you are
* agreeing to reCAPTCHA Enterprise
* The reCAPTCHA configuration to update on the tenant.
* By enabling reCAPTCHA Enterprise integration, you are
* agreeing to the reCAPTCHA Enterprise
* {@link https://cloud.google.com/terms/service-terms | Term of Service}.
*/
recaptchaConfig?: RecaptchaConfig;
Expand Down