app/Dorcas/Support/helpers.php
/**
 * Verifies that a valid client is sending this request
 *
 * @param \Illuminate\Http\Request $request
 *
 * @return bool
 */
Verifies that a valid client is sending this request
@param \Illuminate\Http\Request $request

@return bool
Verifies that a valid client is sending this request @param \ Illuminate \ Http \ Request $request @return bool
function validate_api_client(\Illuminate\Http\Request $request): bool
{
    $client = (new ClientRepository())->find($request->input('client_id'));
    if (empty($client)) {
        throw new RecordNotFoundException('We could not identify your application client.');
    }
    if ($client->secret !== $request->input('client_secret')) {
        throw new \UnexpectedValueException(
            'The provided client_secret is not correct for the provided client.'
        );
    }
    return true;
}
function validate_api_client ( \ Illuminate \ Http \ Request $ request ) : bool { $ client = ( new ClientRepository ( ) ) -> find ( $ request -> input ( 'client_id' ) ) ; if ( empty ( $ client ) ) { throw new RecordNotFoundException ( 'We could not identify your application client.' ) ; } if ( $ client -> secret !== $ request -> input ( 'client_secret' ) ) { throw new \ UnexpectedValueException ( 'The provided client_secret is not correct for the provided client.' ) ; } return true ; }
Verifies that a valid client is sending this request
 @param \Illuminate\Http\Request $request
Verifies that a valid client is sending this request @param \ Illuminate \ Http \ Request $request
# find the OAuth client