/** * Creates a new authentication request. * * @param u that identifies the user * @param c credential to authenticate the user */ public AuthenticationRequest(final User u, final Credential c) { setUser(u); setCredential(c); }
/** * Creates a new authentication request. * * @param u that identifies the user * @param c credential to authenticate the user */ public AuthenticationRequest(final User u, final Credential c) { setUser(u); setCredential(c); }
/** * Creates a new authentication request. * * @param id that identifies the user * @param c credential to authenticate the user */ public AuthenticationRequest(final String id, final Credential c) { setUser(id); setCredential(c); }
/** * Creates a new authentication request. * * @param id that identifies the user * @param c credential to authenticate the user */ public AuthenticationRequest(final String id, final Credential c) { setUser(new User(id)); setCredential(c); }
/** * Creates a new authentication request. * * @param id that identifies the user * @param c credential to authenticate the user */ public AuthenticationRequest(final String id, final Credential c) { setUser(new User(id)); setCredential(c); }
/** * Creates a new authentication request. * * @param id that identifies the user * @param c credential to authenticate the user * @param attrs attributes to return */ public AuthenticationRequest(final String id, final Credential c, final String... attrs) { setUser(id); setCredential(c); setReturnAttributes(attrs); }
/** * Creates a new authentication request. * * @param u that identifies the user * @param c credential to authenticate the user * @param attrs attributes to return */ public AuthenticationRequest(final User u, final Credential c, final String... attrs) { setUser(u); setCredential(c); setReturnAttributes(attrs); }
/** * Creates a new authentication request. * * @param u that identifies the user * @param c credential to authenticate the user * @param attrs attributes to return */ public AuthenticationRequest(final User u, final Credential c, final String... attrs) { setUser(u); setCredential(c); setReturnAttributes(attrs); }
/** * Creates a new authentication request. * * @param id that identifies the user * @param c credential to authenticate the user * @param attrs attributes to return */ public AuthenticationRequest(final String id, final Credential c, final String... attrs) { setUser(new User(id)); setCredential(c); setReturnAttributes(attrs); }
/** * Creates a new authentication request. * * @param id that identifies the user * @param c credential to authenticate the user * @param attrs attributes to return */ public AuthenticationRequest(final String id, final Credential c, final String... attrs) { setUser(new User(id)); setCredential(c); setReturnAttributes(attrs); }
getCredentials(nameCb, passCb, false); authRequest.setUser(nameCb.getName()); authRequest.setCredential(new Credential(passCb.getPassword()));
getCredentials(nameCb, passCb, false); authRequest.setUser(new User(nameCb.getName())); authRequest.setCredential(new Credential(passCb.getPassword()));
/** * Initialize an authentication request with command line options. * * @param line parsed command line arguments * * @return authentication request that has been initialized */ protected AuthenticationRequest initAuthenticationRequest(final CommandLine line) { final AuthenticationRequest request = new AuthenticationRequest(); final AuthenticationRequestPropertySource arSource = new AuthenticationRequestPropertySource( request, getPropertiesFromOptions(PropertyDomain.AUTH.value(), line)); arSource.initialize(); if (request.getUser() == null) { // prompt for a user name final String user = System.console().readLine("[Enter user name]: "); request.setUser(user); } if (request.getCredential() == null) { // prompt the user to enter a password final char[] pass = System.console().readPassword("[Enter password for %s]: ", request.getUser()); request.setCredential(new Credential(pass)); } return request; }
getCredentials(nameCb, passCb, false); authRequest.setUser(new User(nameCb.getName())); authRequest.setCredential(new Credential(passCb.getPassword()));
/** * Initialize an authentication request with command line options. * * @param line parsed command line arguments * * @return authentication request that has been initialized */ protected AuthenticationRequest initAuthenticationRequest(final CommandLine line) { final AuthenticationRequest request = new AuthenticationRequest(); final AuthenticationRequestPropertySource arSource = new AuthenticationRequestPropertySource( request, getPropertiesFromOptions(PropertyDomain.AUTH.value(), line)); arSource.initialize(); if (request.getUser() == null) { // prompt for a user name final String user = System.console().readLine("[Enter user name]: "); request.setUser(new User(user)); } if (request.getCredential() == null) { // prompt the user to enter a password final char[] pass = System.console().readPassword("[Enter password for %s]: ", request.getUser()); request.setCredential(new Credential(pass)); } return request; }
/** * Initialize an authentication request with command line options. * * @param line parsed command line arguments * * @return authentication request that has been initialized */ protected AuthenticationRequest initAuthenticationRequest(final CommandLine line) { final AuthenticationRequest request = new AuthenticationRequest(); final AuthenticationRequestPropertySource arSource = new AuthenticationRequestPropertySource( request, getPropertiesFromOptions(PropertyDomain.AUTH.value(), line)); arSource.initialize(); if (request.getUser() == null) { // prompt for a user name final String user = System.console().readLine("[Enter user name]: "); request.setUser(new User(user)); } if (request.getCredential() == null) { // prompt the user to enter a password final char[] pass = System.console().readPassword("[Enter password for %s]: ", request.getUser()); request.setCredential(new Credential(pass)); } return request; }
/** * Returns an authentication request initialized with the supplied request. * * @param request authentication request to read properties from * * @return authentication request */ public static AuthenticationRequest newAuthenticationRequest(final AuthenticationRequest request) { final AuthenticationRequest r = new AuthenticationRequest(); r.setUser(request.getUser()); r.setCredential(request.getCredential()); r.setReturnAttributes(request.getReturnAttributes()); r.setControls(request.getControls()); return r; }
/** * Returns an authentication request initialized with the supplied request. * * @param request authentication request to read properties from * * @return authentication request */ public static AuthenticationRequest newAuthenticationRequest(final AuthenticationRequest request) { final AuthenticationRequest r = new AuthenticationRequest(); r.setUser(request.getUser()); r.setCredential(request.getCredential()); r.setReturnAttributes(request.getReturnAttributes()); r.setControls(request.getControls()); return r; }