Package javax.naming

Examples of javax.naming.AuthenticationException


                } else {
                    clientIdentity = securityService.login(realmName, user, pass);
                }
                ClientSecurity.setIdentity(clientIdentity);
            } catch (LoginException e) {
                throw (AuthenticationException) new AuthenticationException("User could not be authenticated: "+user).initCause(e);
            }
        }
    }
View Full Code Here


        final AuthenticationResponse res;
        try {
            res = requestAuthorization(req);
        } catch (RemoteException e) {
            throw new AuthenticationException(e.getLocalizedMessage());
        }

        switch (res.getResponseCode()) {
            case ResponseCodes.AUTH_GRANTED:
                client = res.getIdentity();
                break;
            case ResponseCodes.AUTH_REDIRECT:
                client = res.getIdentity();
                server = res.getServer();
                break;
            case ResponseCodes.AUTH_DENIED:
                throw (AuthenticationException) new AuthenticationException("This principle is not authorized.").initCause(res.getDeniedCause());
        }
    }
View Full Code Here

/* 110 */       LoginContext lc = new LoginContext(protocol, handler);
/* 111 */       lc.login();
/*     */     }
/*     */     catch (LoginException e)
/*     */     {
/* 115 */       AuthenticationException ex = new AuthenticationException("Failed to login using protocol=" + protocol);
/* 116 */       ex.setRootCause(e);
/* 117 */       throw ex;
/*     */     }
/*     */   }
View Full Code Here

/* 84 */       LoginContext lc = new LoginContext(protocol, handler);
/* 85 */       lc.login();
/*    */     }
/*    */     catch (LoginException e)
/*    */     {
/* 89 */       AuthenticationException ex = new AuthenticationException("Failed to login using protocol=" + protocol);
/* 90 */       ex.setRootCause(e);
/* 91 */       throw ex;
/*    */     }
/*    */
/* 95 */     Context iniCtx = super.getInitialContext(env);
/* 96 */     return iniCtx;
View Full Code Here

                } else {
                    clientIdentity = securityService.login(realmName, user, pass);
                }
                ClientSecurity.setIdentity(clientIdentity);
            } catch (LoginException e) {
                throw (AuthenticationException) new AuthenticationException("User could not be authenticated: "+user).initCause(e);
            }
        }
    }
View Full Code Here

        AuthenticationResponse res = null;

        try {
            res = requestAuthorization(req);
        } catch (RemoteException e) {
            throw new AuthenticationException(e.getLocalizedMessage());
        }

        switch (res.getResponseCode()) {
            case ResponseCodes.AUTH_GRANTED:
                client = res.getIdentity();
                break;
            case ResponseCodes.AUTH_REDIRECT:
                client = res.getIdentity();
                server = res.getServer();
                break;
            case ResponseCodes.AUTH_DENIED:
                throw (AuthenticationException) new AuthenticationException("This principle is not authorized.").initCause(res.getDeniedCause());
        }
    }
View Full Code Here

         LoginContext lc = new LoginContext(protocol, handler);
         lc.login();
      }
      catch(LoginException e)
      {
         AuthenticationException ex = new AuthenticationException("Failed to login using protocol="+protocol);
         ex.setRootCause(e);
         throw ex;
      }

      // Now return the context using the standard jnp naming context factory
      Context iniCtx = super.getInitialContext(env);
View Full Code Here

  public A() {
  }

  @Action
  public void action() throws AuthenticationException {
    throw new AuthenticationException();
  }
View Full Code Here

import javax.naming.AuthenticationException;

/** @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a> */
public class Bean {
  public Bean() throws Exception {
    throw new AuthenticationException("DON'T FREAK OUT");
  }
View Full Code Here

  public A() {
  }

  @Resource
  public void resource() throws AuthenticationException {
    throw new AuthenticationException();
  }
View Full Code Here

TOP

Related Classes of javax.naming.AuthenticationException

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.