Package org.surfnet.oaaas.auth.principal

Examples of org.surfnet.oaaas.auth.principal.AuthenticatedPrincipal.serialize()


    Map<String, String> attributes = new HashMap<String, String>();
    attributes.put("key", "value");
    String identityProvider = "http://universiteit-hardewijk";
    String displayName = "gebruiker.pi";
    AuthenticatedPrincipal principal = new SAMLAuthenticatedPrincipal("ud.id.name.pi", Arrays.asList(new String[]{"USER", "ADMIN"}), attributes, Arrays.asList(new String[]{"id.group.1", "id.group.2", "id.group.3"}), identityProvider, displayName, true);
    String json = principal.serialize();
    SAMLAuthenticatedPrincipal samlPrincipal = (SAMLAuthenticatedPrincipal) AuthenticatedPrincipal.deserialize(json);
    assertTrue(samlPrincipal.isGroupAware());
    assertEquals(identityProvider, samlPrincipal.getIdentityProvider());
    assertEquals(displayName, samlPrincipal.getDisplayName());
    assertTrue(samlPrincipal.isAdminPrincipal());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.