LoginRequirement

Methods to restrict access to a URL based on login status.

Enums
LOGIN_UNSPECIFIEDNot specified.LOGIN_OPTIONAL is assumed.
LOGIN_OPTIONALDoes not require that the user is signed in.
LOGIN_ADMINIf the user is not signed in, theauthFailAction is taken. In addition, if the user is not an administrator for the application, they are given an error message regardless ofauthFailAction. If the user is an administrator, the handler proceeds.
LOGIN_REQUIREDIf the user has signed in, the handler proceeds normally. Otherwise, the authFailAction is taken.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-07-21 UTC.