Tabnine Logo
SimplePrincipal
Code IndexAdd Tabnine to your IDE (free)

How to use
SimplePrincipal
in
org.jboss.resteasy.plugins.server.embedded

Best Java code snippets using org.jboss.resteasy.plugins.server.embedded.SimplePrincipal (Showing top 5 results out of 315)

origin: resteasy/Resteasy

public Principal authenticate(String username, String password) throws SecurityException
{
 String passwd = users.get(username);
 if (passwd == null) throw new SecurityException(Messages.MESSAGES.userIsNotRegistered(username));
 if (!passwd.equals(password)) throw new SecurityException(Messages.MESSAGES.wrongPassword(username));
 return new SimplePrincipal(username);
}
origin: org.jboss.resteasy/resteasy-test-tjws

public Principal authenticate(String username, String password) throws SecurityException
{
 String passwd = users.get(username);
 if (passwd == null) throw new SecurityException("User is not registered: " + username);
 if (!passwd.equals(password)) throw new SecurityException("Wrong password for: " + username);
 return new SimplePrincipal(username);
}
origin: org.jboss.resteasy/resteasy-jaxrs-20

public Principal authenticate(String username, String password) throws SecurityException
{
 String passwd = users.get(username);
 if (passwd == null) throw new SecurityException(Messages.MESSAGES.userIsNotRegistered(username));
 if (!passwd.equals(password)) throw new SecurityException(Messages.MESSAGES.wrongPassword(username));
 
 return new SimplePrincipal(username);
}
origin: org.jboss.resteasy/resteasy-core

public Principal authenticate(String username, String password) throws SecurityException
{
 String passwd = users.get(username);
 if (passwd == null) throw new SecurityException(Messages.MESSAGES.userIsNotRegistered(username));
 if (!passwd.equals(password)) throw new SecurityException(Messages.MESSAGES.wrongPassword(username));
 return new SimplePrincipal(username);
}
origin: leiguorui/netty-resteasy-spring

  protected void authenticate(ContainerRequestContext ctx)
      throws IOException {

    Principal principal = new SimplePrincipal("Sample" + System.currentTimeMillis());

    ctx.setSecurityContext(
        new NettySecurityContext(principal, null, "BASIC", true)
        );
  }
}
org.jboss.resteasy.plugins.server.embeddedSimplePrincipal

Most used methods

  • <init>

Popular in Java

  • Reactive rest calls using spring rest template
  • getSupportFragmentManager (FragmentActivity)
  • compareTo (BigDecimal)
  • requestLocationUpdates (LocationManager)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • String (java.lang)
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • JFileChooser (javax.swing)
  • Best plugins for Eclipse
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