public function getAuthorizationCode($code)
	{
		// auth model
		$authorizationCode = \Components\Developer\Models\Authorizationcode::oneByCode($code);

		// fetch by code
		if (!$authorizationCode->get('id'))
		{
			return false;
		}

		// get the application's client id
		$application = \Components\Developer\Models\Application::oneOrFail($authorizationCode->get('application_id'));
		$authorizationCode->set('client_id', $application->get('client_id'));

		// format expires to unix timestamp for authorization code grant type
		$authorizationCode->set('expires', with(new Date($authorizationCode->get('expires')))->toUnix());

		// return code
		return $authorizationCode->toArray();
	}
public function getAuthorizationCode($code)
	{
		// auth model
		$authorizationCode = \Components\Developer\Models\Authorizationcode::oneByCode($code);

		// fetch by code
		if (!$authorizationCode->get('id'))
		{
			return false;
		}

		// get the application's client id
		$application = \Components\Developer\Models\Application::oneOrFail($authorizationCode->get('application_id'));
		$authorizationCode->set('client_id', $application->get('client_id'));

		// format expires to unix timestamp for authorization code grant type
		$authorizationCode->set('expires', with(new Date($authorizationCode->get('expires')))->toUnix());

		// return code
		return $authorizationCode->toArray();
	}
public function getAuthorizationCode ( $ code ) { // auth model $ authorizationCode = \ Components \ Developer \ Models \ Authorizationcode :: oneByCode ( $ code ) ; // fetch by code if ( ! $ authorizationCode -> get ( 'id' ) ) { return false ; } // get the application's client id $ application = \ Components \ Developer \ Models \ Application :: oneOrFail ( $ authorizationCode -> get ( 'application_id' ) ) ; $ authorizationCode -> set ( 'client_id' , $ application -> get ( 'client_id' ) ) ; // format expires to unix timestamp for authorization code grant type $ authorizationCode -> set ( 'expires' , with ( new Date ( $ authorizationCode -> get ( 'expires' ) ) ) -> toUnix ( ) ) ; // return code return $ authorizationCode -> toArray ( ) ; }
Get authorization code details by code

@param   string  $code  Authorization code
@return  array   Code details
Get authorization code details by code