/** * Returns the credential. * * @return credential to authenticate dn */ public Credential getCredential() { return authenticationRequest.getCredential(); }
/** * Returns the credential. * * @return credential to authenticate dn */ public Credential getCredential() { return authenticationRequest.getCredential(); }
/** * Returns the credential. * * @return credential to authenticate dn */ public Credential getCredential() { return authenticationRequest.getCredential(); }
/** * 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; }
/** * 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; }
final Credential credential = request.getCredential(); if (credential == null || credential.getBytes() == null) { response = new AuthenticationResponse(
final Credential credential = request.getCredential(); if (credential == null || credential.getBytes() == null) { response = new AuthenticationResponse(
final Credential credential = request.getCredential(); if (credential == null || credential.getBytes() == null) { response = new AuthenticationResponse(
/** * 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; }