Tabnine Logo
AuthnRequest.setForceAuthn
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: org.opensaml/opensaml-saml-impl

/** {@inheritDoc} */
protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
  AuthnRequest req = (AuthnRequest) samlObject;
  if (attribute.getLocalName().equals(AuthnRequest.FORCE_AUTHN_ATTRIB_NAME)) {
    req.setForceAuthn(XSBooleanValue.valueOf(attribute.getValue()));
  } else if (attribute.getLocalName().equals(AuthnRequest.IS_PASSIVE_ATTRIB_NAME)) {
    req.setIsPassive(XSBooleanValue.valueOf(attribute.getValue()));
  } else if (attribute.getLocalName().equals(AuthnRequest.PROTOCOL_BINDING_ATTRIB_NAME)) {
    req.setProtocolBinding(attribute.getValue());
  } else if (attribute.getLocalName().equals(AuthnRequest.ASSERTION_CONSUMER_SERVICE_INDEX_ATTRIB_NAME)) {
    req.setAssertionConsumerServiceIndex(Integer.valueOf(attribute.getValue()));
  } else if (attribute.getLocalName().equals(AuthnRequest.ASSERTION_CONSUMER_SERVICE_URL_ATTRIB_NAME)) {
    req.setAssertionConsumerServiceURL(attribute.getValue());
  } else if (attribute.getLocalName().equals(AuthnRequest.ATTRIBUTE_CONSUMING_SERVICE_INDEX_ATTRIB_NAME)) {
    req.setAttributeConsumingServiceIndex(Integer.valueOf(attribute.getValue()));
  } else if (attribute.getLocalName().equals(AuthnRequest.PROVIDER_NAME_ATTRIB_NAME)) {
    req.setProviderName(attribute.getValue());
  } else {
    super.processAttribute(samlObject, attribute);
  }
}
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: org.apereo.cas/cas-server-support-saml-idp-web

  authnRequest.setIssueInstant(new DateTime(DateTime.now(), ISOChronology.getInstanceUTC()));
authnRequest.setForceAuthn(Boolean.FALSE);
if (StringUtils.isNotBlank(target)) {
  request.setAttribute(SamlProtocolConstants.PARAMETER_SAML_RELAY_STATE, target);
origin: org.apache.syncope.ext.saml2sp/syncope-ext-saml2sp-logic

authnRequest.setForceAuthn(false);
authnRequest.setIsPassive(false);
authnRequest.setVersion(SAMLVersion.VERSION_20);
origin: org.wso2.appserver/appserver-webapp-security

authnRequest.setIssueInstant(new DateTime());
authnRequest.setForceAuthn(
    Optional.ofNullable((Boolean) (request.getAttribute(Constants.IS_FORCE_AUTH_ENABLED)))
        .orElse(false));
origin: org.pac4j/pac4j-saml

request.setVersion(SAMLVersion.VERSION_20);
request.setIsPassive(this.passive);
request.setForceAuthn(this.forceAuth);
request.setProviderName(this.providerName);
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.coreAuthnRequestsetForceAuthn

Javadoc

Sets whether the IdP should force the user to reauthenticate. Boolean values will be marshalled to either "true" or "false".

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
  • setID
  • setRequestedAuthnContext
    Sets the RequestedAuthnContext of the request.
  • 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

  • Creating JSON documents from java classes using gson
  • runOnUiThread (Activity)
  • getSharedPreferences (Context)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • 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