private SAML2Config createSAML2Config() {
   Map<String, String> attributeMap = new HashMap<>();
   attributeMap.put("email", "mail");
   SAML2Config.SAML2ConfigBuilder builder = SAML2Config.builder();
   return builder
       .attributeMap(attributeMap)
       .nameIdFormat(NAME_ID_FORMAT)
       .spEntityId("http://host.com/sp/entity/id")
       .tokenLifetimeInSeconds(TOKEN_LIFETIME_SECONDS)
       .idpId("da_idp")
       .build();
 }
Exemplo n.º 2
0
  private SAML2Config createSAML2Config() throws UnsupportedEncodingException {
    Map<String, String> attributeMap = new HashMap<String, String>();
    attributeMap.put("email", "mail");

    return SAML2Config.builder()
        .attributeMap(attributeMap)
        .nameIdFormat("urn:oasis:names:tc:SAML:2.0:nameid-format:persistent")
        .spEntityId("http://host.com/sp/entity/id")
        .keystoreFile("keystore.jks")
        .keystorePassword("changeit".getBytes(AMSTSConstants.UTF_8_CHARSET_ID))
        .encryptionKeyAlias("test")
        .signatureKeyAlias("test")
        .signatureKeyPassword("changeit".getBytes(AMSTSConstants.UTF_8_CHARSET_ID))
        .build();
  }