public function testExpiresIn() { $this->_authorizationCode->populate(array(AuthorizationCode::FIELD_EXPIRATION_TIME => new \DateTime('tomorrow'))); $seconds = $this->_authorizationCode->expiresIn(); $this->assertInternalType('integer', $seconds); $this->assertGreaterThan(0, $seconds); }
/** * Returns the session associated with the authorization code. * * @param AuthorizationCode $authorizationCode * @return Session */ public function getSessionForAuthorizationCode(AuthorizationCode $authorizationCode) { return $this->getStorageWithCheck()->loadSession($authorizationCode->getSessionId()); }
public function saveAuthorizationCode(AuthorizationCode $authorizationCode) { $this->_authorizationCodes[$authorizationCode->getId()] = $authorizationCode; }
/** * {@inheritdoc} * @see \InoOicServer\Session\Storage\StorageInterface::deleteAuthorizationCode() * @return AuthorizationCode */ public function deleteAuthorizationCode(AuthorizationCode $authorizationCode) { $sql = $this->getSql(); $delete = $sql->delete($this->_getAuthoriozationCodeTableName()); $delete->where(array(AuthorizationCode::FIELD_CODE => $authorizationCode->getCode())); $result = $this->executeSqlQuery($delete); }