Stay organized with collections
Save and categorize content based on your preferences.
com.google.api.server.spi.config
Interface PeerAuthenticator
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-07-28 UTC."],[[["\u003cp\u003e\u003ccode\u003ePeerAuthenticator\u003c/code\u003e is an interface used to verify the peer before the \u003ccode\u003eAuthenticator\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eIf peer authentication fails, it returns \u003ccode\u003efalse\u003c/code\u003e and halts further request processing.\u003c/p\u003e\n"],["\u003cp\u003eIf no custom peer authenticator is set, \u003ccode\u003eEndpointsPeerAuthenticator\u003c/code\u003e is used by default to verify that the request is from Google.\u003c/p\u003e\n"],["\u003cp\u003eCustom peer authenticators should include \u003ccode\u003eEndpointsPeerAuthenticator\u003c/code\u003e at the beginning of their list to ensure requests from Google are verified.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eauthenticate\u003c/code\u003e method of the \u003ccode\u003ePeerAuthenticator\u003c/code\u003e interface, which takes an \u003ccode\u003eHttpServletRequest\u003c/code\u003e as a parameter, returns a boolean indicating the success or failure of authentication.\u003c/p\u003e\n"]]],[],null,["# PeerAuthenticator (endpoints-framework 2.0.0-beta.5 API)\n\ncom.google.api.server.spi.config\n\nInterface PeerAuthenticator\n---------------------------\n\n-\n\n *** ** * ** ***\n\n \u003cbr /\u003e\n\n ```\n public interface PeerAuthenticator\n ``` \n 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.\n\n\n If no peer authenticator is set, `EndpointsPeerAuthenticator` will be the default to verify\n the request is from Google. If you supply your own peer authenticator, make sure you also put\n `EndpointsPeerAuthenticator` to the head of peerAuthenticators list to verify the request\nis from Google. \n-\n -\n\n ### Method Summary\n\n-\n -\n\n ### Method Detail\n\n\n -\n\n #### authenticate\n\n ```\n boolean authenticate(HttpServletRequest request)\n ```"]]