Class Attribute
- java.lang.Object
-
- com.google.api.server.spi.request.Attribute
-
public class Attribute extends Object
Defines attribute constants passed in Request.
-
-
Field Summary
Fields Modifier and Type Field Description static StringAPI_METHOD_CONFIGAApiMethodConfigwith the current API method's configuration.static StringAUTH_TOKENAStringwith the current request's auth token.static StringAUTHENTICATED_APPENGINE_USERAUserwith the currently authenticated App Engine user.static StringENABLE_CLIENT_ID_WHITELISTABooleanindicating if client id whitelist should be checked.static StringID_TOKENIf set, contains a cached instance of a parsed and valid JWTGoogleIdTokencorresponding to the String token in theAUTH_TOKEN"endpoints:Auth-Token" attribute.static StringREQUIRE_APPENGINE_USERABooleanindicating if the App Engine user should be populated.static StringRESTRICT_SERVLETDeprecated.static StringSKIP_TOKEN_AUTHABooleanindicating if token-based authentications (OAuth2 and JWT) should be skipped.static StringTOKEN_INFOIf set, contains a cached OAuth2GoogleAuth.TokenInfocorresponding to the String token in theAUTH_TOKEN"endpoints:Auth-Token" attribute.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AttributebindStandardRequestAttributes(javax.servlet.http.HttpServletRequest request, ApiMethodConfig methodConfig, ServletInitializationParameters initParameters)static Attributefrom(javax.servlet.http.HttpServletRequest request)<T> Tget(String attr)booleanisEnabled(String attr)voidremove(String attr)voidset(String attr, Object value)
-
-
-
Field Detail
-
AUTHENTICATED_APPENGINE_USER
public static final String AUTHENTICATED_APPENGINE_USER
AUserwith the currently authenticated App Engine user.- See Also:
- Constant Field Values
-
API_METHOD_CONFIG
public static final String API_METHOD_CONFIG
AApiMethodConfigwith the current API method's configuration.- See Also:
- Constant Field Values
-
ENABLE_CLIENT_ID_WHITELIST
public static final String ENABLE_CLIENT_ID_WHITELIST
ABooleanindicating if client id whitelist should be checked.- See Also:
- Constant Field Values
-
RESTRICT_SERVLET
public static final String RESTRICT_SERVLET
Deprecated.- See Also:
- Constant Field Values
-
REQUIRE_APPENGINE_USER
public static final String REQUIRE_APPENGINE_USER
ABooleanindicating if the App Engine user should be populated.- See Also:
- Constant Field Values
-
SKIP_TOKEN_AUTH
public static final String SKIP_TOKEN_AUTH
ABooleanindicating if token-based authentications (OAuth2 and JWT) should be skipped.- See Also:
- Constant Field Values
-
AUTH_TOKEN
public static final String AUTH_TOKEN
AStringwith the current request's auth token.- See Also:
- Constant Field Values
-
TOKEN_INFO
public static final String TOKEN_INFO
If set, contains a cached OAuth2GoogleAuth.TokenInfocorresponding to the String token in theAUTH_TOKEN"endpoints:Auth-Token" attribute. The authentication fromGoogleOAuth2Authenticatormight have failed anyway because of unauthorized client id or scopes.- See Also:
- Constant Field Values
-
ID_TOKEN
public static final String ID_TOKEN
If set, contains a cached instance of a parsed and valid JWTGoogleIdTokencorresponding to the String token in theAUTH_TOKEN"endpoints:Auth-Token" attribute. The authentication fromGoogleJwtAuthenticatormight have failed anyway because of unauthorized client id or audience.- See Also:
- Constant Field Values
-
-
Method Detail
-
from
public static Attribute from(javax.servlet.http.HttpServletRequest request)
-
get
public <T> T get(String attr)
-
remove
public void remove(String attr)
-
isEnabled
public boolean isEnabled(String attr)
-
bindStandardRequestAttributes
public static Attribute bindStandardRequestAttributes(javax.servlet.http.HttpServletRequest request, ApiMethodConfig methodConfig, ServletInitializationParameters initParameters)
-
-