eZPublishCommunityProject(LegacyStack)  2013.9
ezpRestClient Class Reference

Persistent object class representing a REST application. More...

Public Member Functions

 __get ($propertyName)
 eZPersistentObject wrapper method: handles "function attributes" More...
 
 __isset ($propertyName)
 
 attribute ($attributeName)
 eZPersistentObject wrapper method More...
 
 authorizeFor ($user=null)
 Authorizes this application for a user. More...
 
 getState ()
 
 hasAttribute ($attributeName)
 eZPersistentObject wrapper method More...
 
 isAuthorizedByUser ($scope, $user=null)
 Checks if this application has been authorized by the current user. More...
 
 isEndPointValid ($endPointUri)
 Validates an attempt (endpoint) redirect URI against the one configured for the client. More...
 
 setState (array $properties)
 
 validateSecret ($secret)
 Convenience method to validate a client secret. More...
 

Static Public Member Functions

static authorizeApplication ($clientId, $endPointUri, $clientSecret=null)
 
static fetchByClientId ($clientId)
 Fetches a rest application using a client Id. More...
 

Public Attributes

 $client_id = null
 
 $client_secret = null
 
 $created = null
 
 $description = null
 
 $endpoint_uri = null
 
 $id = null
 
 $name = null
 
 $owner_id = null
 
 $updated = null
 
 $version = null
 
const STATUS_DRAFT = 1
 
const STATUS_PUBLISHED = 0
 

Protected Member Functions

 _owner ()
 Returns the eZUser who owns the object. More...
 

Detailed Description

Persistent object class representing a REST application.

Member Function Documentation

ezpRestClient::__get (   $propertyName)

eZPersistentObject wrapper method: handles "function attributes"

Parameters
string$propertyName
Returns
mixed

Referenced by attribute().

ezpRestClient::__isset (   $propertyName)

Referenced by attribute(), and hasAttribute().

ezpRestClient::_owner ( )
protected

Returns the eZUser who owns the object.

Returns
eZUser

Referenced by __get().

ezpRestClient::attribute (   $attributeName)

eZPersistentObject wrapper method

Parameters
string$attributeName
Returns
mixed
static ezpRestClient::authorizeApplication (   $clientId,
  $endPointUri,
  $clientSecret = null 
)
static
ezpRestClient::authorizeFor (   $user = null)

Authorizes this application for a user.

Parameters
eZUser$user
Returns
void
static ezpRestClient::fetchByClientId (   $clientId)
static

Fetches a rest application using a client Id.

Parameters
string$clientId
Returns
ezpRestClient

Referenced by ezpOauthUtility\doRefreshToken(), and ezpOauthUtility\doRefreshTokenWithAuthorizationCode().

ezpRestClient::getState ( )
ezpRestClient::hasAttribute (   $attributeName)

eZPersistentObject wrapper method

Parameters
string$attributeName
Returns
bool
ezpRestClient::isAuthorizedByUser (   $scope,
  $user = null 
)

Checks if this application has been authorized by the current user.

Parameters
mixed$scopeThe requested security scope
eZUser$userThe user to check authorization for. Will check for current user if not given.
Returns
bool
Todo:
Handle non-authorization using
ezpRestClient::isEndPointValid (   $endPointUri)

Validates an attempt (endpoint) redirect URI against the one configured for the client.

Parameters
string$endPointUri
Returns
bool true if the URI is valid, false otherwise
ezpRestClient::setState ( array  $properties)
ezpRestClient::validateSecret (   $secret)

Convenience method to validate a client secret.

Parameters
$secret
Returns
bool

Member Data Documentation

ezpRestClient::$client_id = null

Referenced by getState().

ezpRestClient::$client_secret = null

Referenced by getState(), and validateSecret().

ezpRestClient::$created = null

Referenced by getState().

ezpRestClient::$description = null

Referenced by getState().

ezpRestClient::$endpoint_uri = null

Referenced by getState().

ezpRestClient::$id = null

Referenced by authorizeFor(), and getState().

ezpRestClient::$name = null

Referenced by getState().

ezpRestClient::$owner_id = null

Referenced by getState().

ezpRestClient::$updated = null

Referenced by getState().

ezpRestClient::$version = null

Referenced by getState().

const ezpRestClient::STATUS_DRAFT = 1
const ezpRestClient::STATUS_PUBLISHED = 0

The documentation for this class was generated from the following file: