Skip to content

Behaviour of createAuthenticatedToken() #8

Description

@mediafreakch

I have a question regarding the createAuthenticatedToken() function in GigyaProvider class. What exactly happens if inside loadUserByUsername() function a UsernameNotFoundException is thrown? Why do you return a token instead of throwing an AuthenticationException?

// https://github.com/opensky/GigyaBundle/blob/master/Security/Authentication/Provider/GigyaProvider.php

try {
    $loaded = $this->userProvider->loadUserByUsername($user->getUsername());
} catch (UsernameNotFoundException $e) {
     return $token;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions