Search in sources :

Example 1 with UserNotFoundException

use of bakery.persistence.dataobject.configuration.user.UserNotFoundException in project iom-blueprint-project by intershop.

the class RestAuthenticationBean method authorizeOperation.

public void authorizeOperation(HttpServletRequest request, RightDefDOEnumInterface rightDefDO) throws AuthorizeException, UserNotFoundException {
    User usr;
    try {
        String[] credentials = CustomizationUtilityStatic.getCredentialsFromHttpServletRequest(request);
        String userName = credentials[0];
        String password = credentials[1];
        usr = this.userSecurityService.createUserSession(userName, password, EnumInitiator.WEBSERVICE);
    } catch (AuthorizeException e) {
        throw new UserNotFoundException(new NamedId("userDO", "userName"));
    }
    checkpointSecurityService.check(usr.getSessionKey(), rightDefDO);
}
Also used : UserNotFoundException(bakery.persistence.dataobject.configuration.user.UserNotFoundException) User(bakery.user.v1.User) AuthorizeException(bakery.security.exception.AuthorizeException) NamedId(bakery.util.NamedId)

Aggregations

UserNotFoundException (bakery.persistence.dataobject.configuration.user.UserNotFoundException)1 AuthorizeException (bakery.security.exception.AuthorizeException)1 User (bakery.user.v1.User)1 NamedId (bakery.util.NamedId)1