Package org.jboss.soa.esb.services.security.principals

Examples of org.jboss.soa.esb.services.security.principals.User


        checkOrder(MockActionInfo.getInitialiseList()) ;


        Subject subject = new Subject();
        //  add principal
        User user = new User("AustinPowerwich");
        subject.getPrincipals().add(user);
        //  add public credentials
        byte[] publicCred = "publicsecret".getBytes();
        subject.getPublicCredentials().add(publicCred);
View Full Code Here


        final Subject subject = new Subject();
        final Map<String, Object> options = getAllOptions();
        options.put(CertificateLoginModule.ROLE_PROPERTIES, "roles.properties");

        //  simulates the authenticated principal
        final Principal principal = new User("Daniel Bevenius");
        subject.getPrincipals().add(principal);

        //  call add roles
        module.addRoles(subject, principal, null, options);
View Full Code Here

    @Test
  public void isCallerInRole()
  {
    Subject subject = new Subject();
    subject.getPrincipals().add( new User("AustinPowerwich") );
    Group roles = new Group("Roles");
    roles.addMember( new Role("Admin"));
    subject.getPrincipals().add(roles);

    SecurityContext securityContext = new SecurityContext(subject, 30000);
View Full Code Here

  @Test
    public void serializeAndDeserialize() throws IOException, ClassNotFoundException
    {
        Subject subject = new Subject();
        User user = new User("AustinPowerwich");
        subject.getPrincipals().add(user);
        byte[] publicCred = "secret".getBytes();
        subject.getPublicCredentials().add(publicCred);

        SecurityContext securityContext = new SecurityContext(subject, 30000l);
View Full Code Here

  @Test
    public void encryptThenSerializeAndDeserialize() throws IOException, ClassNotFoundException, SecurityServiceException
    {
        Subject subject = new Subject();
        User user = new User("AustinPowerwich");
        subject.getPrincipals().add(user);
        byte[] publicCred = "secret".getBytes();
        subject.getPublicCredentials().add(publicCred);

        SecurityContext securityContext = new SecurityContext(subject, 30000l);
View Full Code Here

  @Test
  public void decryptionConstructor() throws SecurityServiceException
  {
        Subject subject = new Subject();
        User user = new User("AustinPowerwich");
        subject.getPrincipals().add(user);
        byte[] publicCred = "publicsecret".getBytes();
        subject.getPublicCredentials().add(publicCred);
        byte[] privateCred = "privatesecret".getBytes();
        subject.getPrivateCredentials().add(privateCred);
View Full Code Here

  @Test
    public void compareTo() throws SecurityServiceException
    {
        Subject subject = new Subject();
        User user = new User("AustinPowerwich");
        subject.getPrincipals().add(user);
        byte[] publicCred = "publicsecret".getBytes();
        subject.getPublicCredentials().add(publicCred);
        byte[] privateCred = "privatesecret".getBytes();
        subject.getPrivateCredentials().add(privateCred);
View Full Code Here

    {
        for (Principal principal : subject.getPrincipals())
        {
            return principal;
        }
        return new User("NullPrincipal");
    }
View Full Code Here

TOP

Related Classes of org.jboss.soa.esb.services.security.principals.User

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.