src/A1comms/GaeSupportLaravel/Auth/Guard/OAuth2_Guard.php
/**
     * Authenticate a user based on request information,
     * return a valid user object if successful, or null.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Illuminate\Contracts\Auth\Authenticatable|null
     */
Authenticate a user based on request information,
return a valid user object if successful, or null.


Authenticate a user based on request information return a valid user object if successful or null .
public static function validate(Request $request, UserProvider $provider = null)
    {
        $token = $request->bearerToken();
        if (empty($token)) {
            return null;
        }
        try {
            $return = OAuth2::validateToken($token);
        } catch (InvalidTokenException $e) {
            Log::warning('OAuth2 Authentication Guard: ' . $e->getMessage());
            return null;
        }
        ErrorReporting::exceptionHandler((new Exception("Request is using legacy OAuth2 authentication token")), 200);
        return static::returnUser($provider, $return['email']);
    }
public static function validate ( Request $ request , UserProvider $ provider = null ) { $ token = $ request -> bearerToken ( ) ; if ( empty ( $ token ) ) { return null ; } try { $ return = OAuth2 :: validateToken ( $ token ) ; } catch ( InvalidTokenException $ e ) { Log :: warning ( 'OAuth2 Authentication Guard: ' . $ e -> getMessage ( ) ) ; return null ; } ErrorReporting :: exceptionHandler ( ( new Exception ( " Request is using legacy OAuth2 authentication token " ) ) , 200 ) ; return static :: returnUser ( $ provider , $ return [ 'email' ] ) ; }
Authenticate a user based on request information,
 return a valid user object if successful, or null.
Authenticate a user based on request information return a valid user object if successful or null .