congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
SimplePrincipal.<init>
Code IndexAdd Tabnine 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)

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

    • Running tasks concurrently on multiple threads
    • setScale (BigDecimal)
    • getSharedPreferences (Context)
    • addToBackStack (FragmentTransaction)
    • Rectangle (java.awt)
      A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
    • Kernel (java.awt.image)
    • BigInteger (java.math)
      An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
    • MessageFormat (java.text)
      Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
    • NumberFormat (java.text)
      The abstract base class for all number formats. This class provides the interface for formatting and
    • Base64 (org.apache.commons.codec.binary)
      Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
    • From CI to AI: The AI layer in your organization
    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