Package com.comvai.auth.model

Examples of com.comvai.auth.model.SessionUser


        Account account = new Account();
        account.setLoginType( LoginType.OPEN_ID );
        account.setEmail( "pohorelecjozef@gmail.com" );
        accountService.saveAccount( account );

        SessionUser sessionUser = new SessionUser();
        sessionUser.setEmail( account.getEmail() );
        sessionUser.setLoginType( LoginType.OPEN_ID );

        try
        {
            Account authorizedAccount = ( Account ) authService.authenticate( sessionUser );
            Assert.assertEquals( "pohorelecjozef@gmail.com", authorizedAccount.getEmail() );
View Full Code Here


    }

    @Test
    public void testAuthenticateBadEmailAccount()
    {
        SessionUser sessionUser = new SessionUser();
        sessionUser.setLoginType( LoginType.OPEN_ID );
        sessionUser.setEmail( "john@foo.com" );

        try
        {
            authService.authenticate( sessionUser );
        }
View Full Code Here

        catch ( Exception e )
        {
            Assert.fail( "This exception should not be thrown: " + e );
        }

        SessionUser sessionUser = new SessionUser();
        sessionUser.setLogin( account.getLogin() );
        sessionUser.setPassword( "1111" );
        sessionUser.setLoginType( LoginType.LOGIN );

        try
        {
            Account authorizedAccount = ( Account ) authService.authenticate( sessionUser );
            Assert.assertEquals( "dodo", authorizedAccount.getLogin() );
View Full Code Here

    }

    @Test
    public void testAuthenticateBadLoginAccount()
    {
        SessionUser sessionUser = new SessionUser();
        sessionUser.setLoginType( LoginType.LOGIN );
        sessionUser.setLogin( "john" );
        sessionUser.setPassword( "foo" );

        try
        {
            authService.authenticate( sessionUser );
        }
View Full Code Here

TOP

Related Classes of com.comvai.auth.model.SessionUser

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.