kernel/private/oauth/classes/restclient.php
public static function authorizeApplication( $clientId, $endPointUri, $clientSecret = null )
    {
        $client = self::fetchByClientId( $clientId );

        // no client found with this ID
        if ( $client === false )
            return false;

        if ( $clientSecret !== null && ( $clientSecret !== $client->client_secret ) )
            return false;

        if ( ( $client->endpoint_uri !== '' ) && ( $endPointUri !== $client->endpoint_uri ) )
            return false;

        return true;
    }
public static function authorizeApplication( $clientId, $endPointUri, $clientSecret = null )
    {
        $client = self::fetchByClientId( $clientId );

        // no client found with this ID
        if ( $client === false )
            return false;

        if ( $clientSecret !== null && ( $clientSecret !== $client->client_secret ) )
            return false;

        if ( ( $client->endpoint_uri !== '' ) && ( $endPointUri !== $client->endpoint_uri ) )
            return false;

        return true;
    }
public static function authorizeApplication ( $ clientId , $ endPointUri , $ clientSecret = null ) { $ client = self :: fetchByClientId ( $ clientId ) ; // no client found with this ID if ( $ client === false ) return false ; if ( $ clientSecret !== null && ( $ clientSecret !== $ client -> client_secret ) ) return false ; if ( ( $ client -> endpoint_uri !== '' ) && ( $ endPointUri !== $ client -> endpoint_uri ) ) return false ; return true ; }
Validates an authorization request by an application using the ID, redirection URI and secret if provided.

@var string $clientId
@var string $endPointUri
@var string $clientSecret

@return bool True if the app is valid, false if it isn't
@todo Enhance the return variable, as several status would be required. Exceptions, or constants ?
Validates an authorization request by an application using the ID redirection URI and secret if provided .