Verifies an email token

@param array $options Options
@return mixed
325078
public function verifyEmailToken($options = []) {
		$options = Hash::merge(
			$this->getConfig('verifyEmailToken'),
			$options,
			['type' => 'Email']
		);

		return $this->verifyToken($options);
	}
102246
public function fromArray(array $options)
    {
        if (isset($options['Code'])) {
            Validate::isInteger($options['Code'], 'options[Code]');
            $this->_code = $options['Code'];
        }

        if (isset($options['Message'])) {
            Validate::isString($options['Message'], 'options[Message]');
            $this->_message = $options['Message'];
        }
    }
1231232
protected function error($options)
    {
        /* @var \Gregwar\CaptchaBundle\Generator\CaptchaGenerator $generator */
        $generator = $this->container->get('gregwar_captcha.generator');
        $generator->setPhrase('');

        $response = new Response($generator->generate($options));
        $response->setStatusCode(428);
        $response->headers->set('Content-type', 'image/jpeg');
        $response->headers->set('Pragma', 'no-cache');
        $response->headers->set('Cache-Control', 'no-cache');

        return $response;
    }
1164062
public function fromArray(array $options)
    {
        if (isset($options['Id'])) {
            Validate::isString($options['Id'], 'options[Id]');
            $this->_id = $options['Id'];
        }

        if (isset($options['Name'])) {
            Validate::isString($options['Name'], 'options[Name]');
            $this->_name = $options['Name'];
        }

        if (isset($options['ContentFileSize'])) {
            Validate::isString(
                $options['ContentFileSize'],
                'options[ContentFileSize]'
            );
            $this->_contentFileSize = $options['ContentFileSize'];
        }

        if (isset($options['ParentAssetId'])) {
            Validate::isString(
                $options['ParentAssetId'],
                'options[ParentAssetId]'
            );
            $this->_parentAssetId = $options['ParentAssetId'];
        }

        if (isset($options['EncryptionVersion'])) {
            Validate::isString(
                $options['EncryptionVersion'],
                'options[EncryptionVersion]'
            );
            $this->_encryptionVersion = $options['EncryptionVersion'];
        }

        if (isset($options['EncryptionScheme'])) {
            Validate::isString(
                $options['EncryptionScheme'],
                'options[EncryptionScheme]'
            );
            $this->_encryptionScheme = $options['EncryptionScheme'];
        }

        if (isset($options['IsEncrypted'])) {
            Validate::isBoolean(
                $options['IsEncrypted'],
                'options[IsEncrypted]'
            );
            $this->_isEncrypted = $options['IsEncrypted'];
        }

        if (isset($options['EncryptionKeyId'])) {
            Validate::isString(
                $options['EncryptionKeyId'],
                'options[EncryptionKeyId]'
            );
            $this->_encryptionKeyId = $options['EncryptionKeyId'];
        }

        if (isset($options['InitializationVector'])) {
            Validate::isString(
                $options['InitializationVector'],
                'options[InitializationVector]'
            );
            $this->_initializationVector = $options['InitializationVector'];
        }

        if (isset($options['IsPrimary'])) {
            Validate::isBoolean($options['IsPrimary'], 'options[IsPrimary]');
            $this->_isPrimary = $options['IsPrimary'];
        }

        if (isset($options['LastModified'])) {
            Validate::isDateString(
                $options['LastModified'],
                'options[LastModified]'
            );
            $this->_lastModified = new \DateTime($options['LastModified']);
        }

        if (isset($options['Created'])) {
            Validate::isDateString($options['Created'], 'options[Created]');
            $this->_created = new \DateTime($options['Created']);
        }

        if (isset($options['MimeType'])) {
            Validate::isString($options['MimeType'], 'options[MimeType]');
            $this->_mimeType = $options['MimeType'];
        }

        if (isset($options['ContentChecksum'])) {
            Validate::isString(
                $options['ContentChecksum'],
                'options[ContentChecksum]'
            );
            $this->_contentCheckSum = $options['ContentChecksum'];
        }
    }
475960
public function generateToken($data, $options = array())
    {
        return $this->encodeToken(
            $this->buildClaims($options + array('data' => $data)),
            $this->secret
        );
    }
328675
public function exchangeConsumerRequestForAccessToken ( $token, $options = array() )
	{
		$new_token  = $this->generateKey(true);
		$new_secret = $this->generateKey();
		
		$sql = "BEGIN SP_EXCH_CONS_REQ_FOR_ACC_TOKEN(:P_TOKEN_TTL, :P_NEW_TOKEN, :P_TOKEN, :P_TOKEN_SECRET, :P_VERIFIER, :P_OUT_TOKEN_TTL, :P_RESULT); END;";

			// parse sql
		$stmt = oci_parse($this->conn, $sql) or die ('Can not parse query');

		// Bind In and Out Variables
		oci_bind_by_name($stmt, ':P_TOKEN_TTL', $options['token_ttl'], 255);
		oci_bind_by_name($stmt, ':P_NEW_TOKEN', $new_token, 255);
		oci_bind_by_name($stmt, ':P_TOKEN', $token, 255);
		oci_bind_by_name($stmt, ':P_TOKEN_SECRET', $new_secret, 255);
		oci_bind_by_name($stmt, ':P_VERIFIER', $options['verifier'], 255);
		oci_bind_by_name($stmt, ':P_OUT_TOKEN_TTL', $ttl, 255);
		oci_bind_by_name($stmt, ':P_RESULT', $result, 20);


		//Execute the statement
		oci_execute($stmt);

		$ret = array('token' => $new_token, 'token_secret' => $new_secret);
		if (is_numeric($ttl))
		{
			$ret['token_ttl'] = intval($ttl);
		}
		return $ret;
	}
125544
public function validates($entity, $options = [])
    {
        $fieldname = $this->name();

        if (!isset($entity->{$fieldname})) {
            return true;
        }
        return $entity->{$fieldname}->validates($options);
    }
225935
public static function acceptsOptions( array $options )
    {
        $tl = strlen( static::TYPE );

        return isset( $options['type'] ) && (
            static::TYPE == $options['type'] || (
                strlen( $options['type'] ) > $tl &&
                ( static::TYPE . '.' ) == substr( $options['type'], 0, $tl + 1 )
            )
        );
    }
723104
public function validateCopy(array &$submitted, array $options = array())
    {
        $this->options = $options;
        $this->submitted = &$submitted;

        $this->validateDestinationNameCopy();
        $this->validateDestinationDirectoryCopy();
        $this->validateDestinationExistanceCopy();

        return $this->getResult();
    }
508404
protected function validateEmailVerification(array $credentials)
    {
        if (is_null($user = $this->getUser($credentials))) {
            return static::INVALID_USER;
        }

        if (! $this->validateToken($user, $credentials)) {
            return static::INVALID_TOKEN;
        }

        if (! $this->validateTimestamp($credentials['expiration'])) {
            return static::EXPIRED_TOKEN;
        }

        return $user;
    }
724662
public function invoices(array $options = [])
    {
        if (!isset($this->invoices)) {
            $options['customer_uuid'] = $this->uuid;
            $this->invoices = CustomerInvoices::all($options)->invoices;
        }
        return $this->invoices;
    }
656022
public function checkMessages(array $options = [])
    {
        $this->buildCall('/incoming-messages');
        $this->buildBody($options);

        $rawMessages = $this->getRequest()->json();

        return $this->makeMessages($rawMessages['Response']['Entries']);
    }
192404
public function getLoginUrl(array $options = [])
    {
        $url = $this->provider->getAuthorizationUrl($options);
        $this->store->set('oauth2state', $this->provider->getState());
        return $url;
    }
911901
protected function _send(array $options) {
        $options['apikey'] = $this->_apiKey;
        $get = array(
            'method' => $options['method'],
            'output' => $this->_outputType
        );
        unset($options['method']);
        
        $uri  = 'http://'.$this->_datacenterId.'.api.mailchimp.com/1.3/?';
        $uri .= http_build_query($get);

        $response = $this->getHttpClient()
                         ->setParameterPost($options)
                         ->setMethod(Zend_Http_Client::POST)
                         ->setUri($uri)
                         ->request()
        ;
        $response = Zend_Json::decode($response->getBody());
        return $response;
    }
732218
public function execute($options = array())
    {
        $sm = $this->container->get('sakonnin.messages');
        $um = $this->container->get('fos_user.user_manager');

        $message = $options['message'];

        // First, check subject, no error, return.
        if (!preg_match("/error/i", $message->getSubject())) return true;

        // Find who to send this to.
        $first = $message->getFirstPost();

        $receivers = isset($options['attributes']) ? $options['attributes'] : array();
        // I'm not ready for validating a mail address. this is just a simple.
        // TODO: Find out where this came from and decide who/what til get it.
        // This is most probably wrong and the From is a username.
        if ($first->getFrom())
            $receivers[] = $first->getFrom();

        $options['provide_link'] = true;
        foreach ($receivers as $receiver) {
            $this->sendNotification($receiver, $message->getBody());
        }

        return true;
    }
1130602
protected function validateClientOptions(array $options) {
        parent::validateClientOptions($options);
        
        \CharlotteDunois\Validation\Validator::make($options, array(
            'commandPrefix' => 'string|nullable',
            'commandBlockedMessagePattern' => 'boolean',
            'commandEditableDuration' => 'integer',
            'commandThrottlingMessagePattern' => 'boolean',
            'nonCommandEditable' => 'boolean',
            'unknownCommandResponse' => 'boolean',
            'owners' => 'array:string|array:integer',
            'invite' => 'string'
        ))->throw(\InvalidArgumentException::class);
    }
26356
public function verificationEmail(EntityInterface $user, array $options = []) {
		$defaults = [
			'to' => $user->get('email'),
			'subject' => __d('user_tools', 'Please verify your Email'),
			'template' => 'Burzum/UserTools.Users/verification_email',
		];
		$this->_applyOptions(array_merge($defaults, $options));
		$this->set('user', $user);
	}