# PeerAuthenticator (endpoints-framework 2.0.0-beta.5 API)

com.google.api.server.spi.config

## Interface PeerAuthenticator

-

  *** ** * ** ***

  <br />

  ```
  public interface PeerAuthenticator
  ```
  Peer authenticators aim to verify the peer and run before `Authenticator`. It returns false if authentication failed and stops handling the rest of the request; true if authentication succeeds and continue to execute rest of peer authenticators.


  If no peer authenticator is set, `EndpointsPeerAuthenticator` will be the default to verify
  the request is from Google. If you supply your own peer authenticator, make sure you also put
  `EndpointsPeerAuthenticator` to the head of peerAuthenticators list to verify the request
  is from Google.
-
  -

    ### Method Summary

    | Modifier and Type | Method and Description |
    |---|---|
    | `boolean` | `https://docs.cloud.google.com/endpoints/docs/frameworks/java/javadoc/com/google/api/server/spi/config/PeerAuthenticator.html#authenticate-HttpServletRequest-(HttpServletRequest request)` |
    [All Methods Instance Methods Abstract Methods]

-
  -

    ### Method Detail


    -

      #### authenticate

      ```
      boolean authenticate(HttpServletRequest request)
      ```