MCPcopy Index your code
hub / github.com/parse-community/parse-server / validateAuthData

Method validateAuthData

src/Adapters/Auth/oauth2.js:92–100  ·  view source on GitHub ↗
(authData)

Source from the content-addressed store, hash-verified

90 }
91
92 async validateAuthData(authData) {
93 const response = await this.requestTokenInfo(authData.access_token);
94
95 if (!response.active || (this.useridField && authData.id !== response[this.useridField])) {
96 throw new Parse.Error(Parse.Error.OBJECT_NOT_FOUND, 'OAuth2 access token is invalid for this user.');
97 }
98
99 return {};
100 }
101
102 async requestTokenInfo(accessToken) {
103 const response = await fetch(this.tokenIntrospectionEndpointUrl, {

Callers 7

RestWrite.jsFile · 0.45
authDataValidatorFunction · 0.45
LdapAuth.spec.jsFile · 0.45
oauth2.spec.jsFile · 0.45
gcenter.spec.jsFile · 0.45
twitter.spec.jsFile · 0.45

Calls 1

requestTokenInfoMethod · 0.95

Tested by

no test coverage detected