Tabnine Logo
Credentials.getUsername
Code IndexAdd Tabnine to your IDE (free)

How to use
getUsername
method
in
com.oberasoftware.jasdb.api.security.Credentials

Best Java code snippets using com.oberasoftware.jasdb.api.security.Credentials.getUsername (Showing top 2 results out of 315)

origin: oberasoftware/jasdb

@Override
public User authenticate(Credentials credentials) throws JasDBStorageException {
  return credentialsProvider.getUser(credentials.getUsername(), credentials.getSourceHost(), credentials.getPassword());
}
origin: oberasoftware/jasdb

@Override
protected void authenticate(Credentials credentials) throws JasDBStorageException {
  if(credentials != null) {
    TokenConnector tokenConnector = RemoteConnectorFactory.createConnector(getNodeInformation(), TokenConnector.class);
    UserSession session = tokenConnector.loadSession(credentials.getUsername(), credentials.getPassword());
    if(StringUtils.stringNotEmpty(session.getAccessToken()) && StringUtils.stringNotEmpty(session.getSessionId())) {
      context = new RemotingContext(true);
      context.setUserSession(session);
      LOG.debug("Token: {} session: {}", session.getAccessToken(), session.getSessionId());
    } else {
      throw new JasDBSecurityException("Unable to obtain access token to service");
    }
  } else {
    context = new RemotingContext(true);
  }
}
com.oberasoftware.jasdb.api.securityCredentialsgetUsername

Popular methods of Credentials

  • getPassword
  • getSourceHost

Popular in Java

  • Making http requests using okhttp
  • onCreateOptionsMenu (Activity)
  • getResourceAsStream (ClassLoader)
  • getApplicationContext (Context)
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now