Codota Logo
SimplePrincipal.<init>
Code IndexAdd Codota to your IDE (free)

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

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

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
SimpleDateFormat s =
  • Codota IconString pattern;new SimpleDateFormat(pattern)
  • Codota IconString template;Locale locale;new SimpleDateFormat(template, locale)
  • Codota Iconnew SimpleDateFormat()
  • Smart code suggestions by Codota
}
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<init>

Popular methods of SimplePrincipal

    Popular in Java

    • Reactive rest calls using spring rest template
    • getApplicationContext (Context)
    • onRequestPermissionsResult (Fragment)
    • getSystemService (Context)
    • Font (java.awt)
      The Font class represents fonts, which are used to render text in a visible way. A font provides the
    • ServerSocket (java.net)
      This class represents a server-side socket that waits for incoming client connections. A ServerSocke
    • Calendar (java.util)
      Calendar is an abstract base class for converting between a Date object and a set of integer fields
    • JButton (javax.swing)
    • StringUtils (org.apache.commons.lang)
      Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
    • Logger (org.apache.log4j)
      This is the central class in the log4j package. Most logging operations, except configuration, are d
    Codota Logo
    • Products

      Search for Java codeSearch for JavaScript codeEnterprise
    • IDE Plugins

      IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
    • Company

      About UsContact UsCareers
    • Resources

      FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
    Get Codota for your IDE now