congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
AssertionUtil.createAssertion
Code IndexAdd Tabnine to your IDE (free)

How to use
createAssertion
method
in
org.picketlink.identity.federation.core.saml.v2.util.AssertionUtil

Best Java code snippets using org.picketlink.identity.federation.core.saml.v2.util.AssertionUtil.createAssertion (Showing top 5 results out of 315)

origin: org.picketlink/picketlink-core

/**
 * Create an assertion
 *
 * @param id
 * @param issuer
 * @return
 */
public AssertionType createAssertion(String id, NameIDType issuer) {
  return AssertionUtil.createAssertion(id, issuer);
}
origin: org.overlord/overlord-commons-auth

/**
 * Creates a SAML Assertion that can be used as a bearer token when invoking REST
 * services.  The REST service must be configured to accept SAML Assertion bearer
 * tokens.
 *
 * In JBoss this means protecting the REST services with {@link org.overlord.commons.auth.jboss7.SAMLBearerTokenLoginModule}.
 * In Tomcat7 this means protecting the REST services with {@link org.overlord.commons.auth.tomcat7.SAMLBearerTokenAuthenticator}.
 *
 * @param principal
 * @param roles
 * @param issuerName
 * @param forService
 * @param timeValidInMillis
 */
public static String createSAMLAssertion(Principal principal, Set<String> roles, String issuerName,
    String forService, int timeValidInMillis) {
  try {
    NameIDType issuer = SAMLAssertionFactory.createNameID(null, null, issuerName);
    SubjectType subject = AssertionUtil.createAssertionSubject(principal.getName());
    AssertionType assertion = AssertionUtil.createAssertion(UUID.randomUUID().toString(), issuer);
    assertion.setSubject(subject);
    AssertionUtil.createTimedConditions(assertion, timeValidInMillis);
    ConditionAbstractType restriction = SAMLAssertionFactory.createAudienceRestriction(forService);
    assertion.getConditions().addCondition(restriction);
    addRoleStatements(roles, assertion, principal);
    return AssertionUtil.asString(assertion);
  } catch (Exception e) {
    throw new RuntimeException(e);
  }
}
origin: org.picketlink/picketlink-federation

/**
 * Create an assertion
 *
 * @param id
 * @param issuer
 *
 * @return
 */
public AssertionType createAssertion(String id, NameIDType issuer) {
  return AssertionUtil.createAssertion(id, issuer);
}
origin: org.picketlink/picketlink-fed

/**
* Create an assertion
* @param id
* @param issuer
* @return
*/
public AssertionType createAssertion(String id, NameIDType issuer)
{
 return AssertionUtil.createAssertion(id, issuer);
}
origin: picketlink/picketlink

/**
 * Create an assertion
 *
 * @param id
 * @param issuer
 *
 * @return
 */
public AssertionType createAssertion(String id, NameIDType issuer) {
  return AssertionUtil.createAssertion(id, issuer);
}
org.picketlink.identity.federation.core.saml.v2.utilAssertionUtilcreateAssertion

Javadoc

Create an assertion

Popular methods of AssertionUtil

  • hasExpired
    Verify whether the assertion has expired. You can add in a clock skew to adapt to conditions where i
  • getRoles
    Given an assertion, return the list of roles it may have
  • getExpiration
    Extract the expiration time from an AssertionType
  • asString
    Given AssertionType, convert it into a String
  • createTimedConditions
    Add validity conditions to the SAML2 Assertion
  • createSAML11TimedConditions
    Add validity conditions to the SAML2 Assertion
  • isSignatureValid
    Given an assertion element, validate the signature
  • asDocument
    Given AssertionType, convert it into a DOM Document.
  • createAssertionSubject
    Given a user name, create a SubjectType that can then be inserted into an assertion
  • isAudience
    Checks whether the given assertion is intended for the given org.picketlink.config.federation.SPType

Popular in Java

  • Making http post requests using okhttp
  • setScale (BigDecimal)
  • scheduleAtFixedRate (Timer)
  • addToBackStack (FragmentTransaction)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • Menu (java.awt)
  • Kernel (java.awt.image)
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • JPanel (javax.swing)
  • Best IntelliJ plugins
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