ApiAuth

com.google.api.server.spi.config

Annotation Type ApiAuth



  • @Retention(value=RUNTIME)
     @Target(value=TYPE)
    public @interface ApiAuth
    Annotation for API authentication configuration.
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element and Description
      AnnotationBoolean allowCookieAuth
      Allows cookie authentication to be used for the API.
      java.lang.String[] blockedRegions
      A list of ISO region codes to block.
    • Element Detail

      • allowCookieAuth

        public abstract AnnotationBoolean allowCookieAuth
        Allows cookie authentication to be used for the API. By default, API methods do not allow cookie authentication, and require the use of OAuth2. Setting this field to true will allow cookies to be used to access the API, with potentially dangerous results. Please be very cautious in enabling this setting, and make sure to require appropriate XSRF tokens to protect your API.
        Default:
        com.google.api.server.spi.config.AnnotationBoolean.UNSPECIFIED
      • blockedRegions

        public abstract java.lang.String[] blockedRegions
        A list of ISO region codes to block. By default, APIs allow all regions.
        Default:
        {}
本頁內容對您是否有任何幫助?請提供意見:

傳送您對下列選項的寶貴意見...

這個網頁
Cloud Endpoints Frameworks for App Engine
需要協助嗎?請前往我們的支援網頁