congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
AuthnRequest.setID
Code IndexAdd Tabnine to your IDE (free)

How to use
setID
method
in
org.opensaml.saml.saml2.core.AuthnRequest

Best Java code snippets using org.opensaml.saml.saml2.core.AuthnRequest.setID (Showing top 8 results out of 315)

origin: line/armeria

authnRequest.setID(requestIdManager.newId());
origin: apache/cxf

@SuppressWarnings("unchecked")
//CHECKSTYLE:OFF
public static AuthnRequest createAuthnRequest(
  String serviceURL,
  boolean forceAuthn,
  boolean isPassive,
  String protocolBinding,
  SAMLVersion version,
  Issuer issuer,
  NameIDPolicy nameIDPolicy,
  RequestedAuthnContext requestedAuthnCtx
) {
//CHECKSTYLE:ON
  if (authnRequestBuilder == null) {
    authnRequestBuilder = (SAMLObjectBuilder<AuthnRequest>)
      builderFactory.getBuilder(AuthnRequest.DEFAULT_ELEMENT_NAME);
  }
  AuthnRequest authnRequest = authnRequestBuilder.buildObject();
  authnRequest.setAssertionConsumerServiceURL(serviceURL);
  authnRequest.setForceAuthn(forceAuthn);
  authnRequest.setID("_" + UUID.randomUUID());
  authnRequest.setIsPassive(isPassive);
  authnRequest.setIssueInstant(new DateTime());
  authnRequest.setProtocolBinding(protocolBinding);
  authnRequest.setVersion(version);
  authnRequest.setIssuer(issuer);
  authnRequest.setNameIDPolicy(nameIDPolicy);
  authnRequest.setRequestedAuthnContext(requestedAuthnCtx);
  return authnRequest;
}
origin: net.shibboleth.idp/idp-saml-impl

/**
 * Build a synthetic AuthnRequest instance from the IdP-initiated SSO request structure.
 * 
 * @return the synthetic AuthnRequest message instance
 * 
 * @throws MessageDecodingException if the inbound request does not contain an entityID value
 */
@Nonnull protected AuthnRequest buildAuthnRequest() throws MessageDecodingException {
  final AuthnRequest authnRequest = requestBuilder.buildObject();
  
  final Issuer requestIssuer = issuerBuilder.buildObject();
  requestIssuer.setValue(ssoRequest.getEntityId());
  authnRequest.setIssuer(requestIssuer);
  
  final NameIDPolicy nip = nipBuilder.buildObject();
  nip.setAllowCreate(true);
  authnRequest.setNameIDPolicy(nip);
  authnRequest.setAssertionConsumerServiceURL(ssoRequest.getAssertionConsumerServiceURL());
  authnRequest.setIssueInstant(new DateTime(ssoRequest.getTime(), ISOChronology.getInstanceUTC()));
  authnRequest.setVersion(SAMLVersion.VERSION_20);
  authnRequest.setID(getMessageID());
  
  return authnRequest;
}

origin: org.apache.syncope.ext.saml2sp/syncope-ext-saml2sp-logic

authnRequest.setID("_" + SecureRandomUtils.generateRandomUUID().toString());
authnRequest.setForceAuthn(false);
authnRequest.setIsPassive(false);
origin: org.wso2.appserver/appserver-webapp-security

authnRequest.setID(SSOUtils.createID());
authnRequest.setVersion(SAMLVersion.VERSION_20);
authnRequest.setIssueInstant(new DateTime());
origin: com.linecorp.armeria/armeria-saml

authnRequest.setID(requestIdManager.newId());
origin: org.pac4j/pac4j-saml

request.setID(SAML2Utils.generateID());
request.setIssuer(getIssuer(selfContext.getEntityId()));
request.setIssueInstant(DateTime.now(DateTimeZone.UTC).plusSeconds(this.issueInstantSkewSeconds));
origin: spring-projects/spring-security-saml

  protected AuthnRequest internalToXml(AuthenticationRequest request) {
    AuthnRequest auth = buildSAMLObject(AuthnRequest.class);
    auth.setID(request.getId());
    auth.setVersion(SAMLVersion.VERSION_20);
    auth.setIssueInstant(request.getIssueInstant());
    auth.setForceAuthn(request.isForceAuth());
    auth.setIsPassive(request.isPassive());
    auth.setProtocolBinding(request.getBinding().toString());
    // Azure AD as IdP will not accept index if protocol binding or AssertationCustomerServiceURL is set.
//        auth.setAssertionConsumerServiceIndex(request.getAssertionConsumerService().getIndex());
    auth.setAssertionConsumerServiceURL(request.getAssertionConsumerService().getLocation());
    auth.setDestination(request.getDestination().getLocation());
    auth.setNameIDPolicy(getNameIDPolicy(request.getNameIdPolicy()));
    auth.setRequestedAuthnContext(getRequestedAuthenticationContext(request));
    auth.setIssuer(toIssuer(request.getIssuer()));
    if (request.getSigningKey() != null) {
      this.signObject(auth, request.getSigningKey(), request.getAlgorithm(), request.getDigest());
    }

    return auth;
  }

org.opensaml.saml.saml2.coreAuthnRequestsetID

Popular methods of AuthnRequest

  • setNameIDPolicy
    Sets the NameIDPolicy of the request.
  • setAssertionConsumerServiceURL
    Sets the URL of the particular Assertion Consumer Service to which the response to this request shou
  • setIssueInstant
  • setIssuer
  • setProtocolBinding
    Sets the protocol binding URI for the request.
  • setDestination
  • setRequestedAuthnContext
    Sets the RequestedAuthnContext of the request.
  • setForceAuthn
    Sets whether the IdP should force the user to reauthenticate.
  • getAssertionConsumerServiceURL
    Gets the URL of the particular Assertion Consumer Service to which the response to this request shou
  • getProtocolBinding
    Gets the protocol binding URI for the request.
  • setIsPassive
    Sets whether the IdP should refrain from interacting with the user during the authentication process
  • setVersion
  • setIsPassive,
  • setVersion,
  • getAssertionConsumerServiceIndex,
  • getNameIDPolicy,
  • getID,
  • getSubject,
  • isForceAuthn,
  • isPassive,
  • getRequestedAuthnContext

Popular in Java

  • Start an intent from android
  • putExtra (Intent)
  • getSharedPreferences (Context)
  • onRequestPermissionsResult (Fragment)
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • JOptionPane (javax.swing)
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • 21 Best Atom Packages for 2021
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now