Add ability to create Yubikey, SMS second factor

- [x] Translate translation keys
- [x] Document second factor API in [wiki](https://wiki.surfnet.nl/display/stepup/API+Design)
- [x] Decide on consistent usage of Step-up domain value objects in projection entities
  - [x] `\Surfnet\StepupMiddleware\ApiBundle\Identity\Entity\Identity::$institution` has string type hint.
- [ ] Keep a list of second factors in the agg root
- [ ] Refactor projections to have one (immutable) object per state.
- [ ] Move controller actions with identity resource root into identity controller.
[Y]
On Nov 27, 2014 2:29 PM, "Reinier Kip" <notifications@github.com> wrote:

> In
> src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Processor/EmailProcessor.php:
>
> > +     * @var SecondFactorMailService
> > +     */
> > +    private $service;
> > +
> > +    /**
> > +     * @param SecondFactorMailService $service
> > +     */
> > +    public function __construct(SecondFactorMailService $service)
> > +    {
> > +        $this->service = $service;
> > +    }
> > +
> > +    public function handlePhonePossessionProvenEvent(PhonePossessionProvenEvent $event)
> > +    {
> > +        $this->service->sendEmailVerificationEmail(
> > +            'en_GB', // @TODO Identity preferred locale
>
> I infer the following: in the future, we will store the identity's
> preferred locale in the aggregate. For now, when creating the event, pass
> in the static locale 'en_GB'. This event property can then be used when
> sending the e-mail verification e-mail verification e-mail.
>
> [Y/n]  [image: image]
> <https://camo.githubusercontent.com/8e3bf9bcd29c3ba13ff43648a18833ac2d3c148a/687474703a2f2f696d67332e77696b69612e6e6f636f6f6b69652e6e65742f5f5f636232303039313132393034313433322f756e6379636c6f70656469612f696d616765732f622f62382f5468696e5f637572736f722e676966>
>
> --
> Reply to this email directly or view it on GitHub
> <https://github.com/SURFnet/Stepup-Middleware/pull/17/files#r20995862>.
>