Tabnine Logo
AuthenticationParameters
Code IndexAdd Tabnine to your IDE (free)

How to use
AuthenticationParameters
in
javax.security.enterprise.authentication.mechanism.http

Best Java code snippets using javax.security.enterprise.authentication.mechanism.http.AuthenticationParameters (Showing top 20 results out of 315)

origin: javax/javaee-web-api

/**
 * Creates a new instance of AuthenticationParameters, useful for a fluent/builder
 * style creation of parameters.
 * 
 * @return a new AuthenticationParameters instance.
 */
public static AuthenticationParameters withParams() {
  return new AuthenticationParameters();
}
origin: javax/javaee-web-api

/**
 * Sets the credential to be used by the authentication mechanism responding
 * to the authenticate call in which these AuthenticationParameters are passed.
 * 
 * @param credential the credential to be used by the authentication mechanism
 * 
 * @return the instance of AuthenticationParameters on which this call was made, useful for a fluent/builder
 * style creation of parameters.
 */
public AuthenticationParameters credential(Credential credential) {
  setCredential(credential);
  return this;
}
origin: javax/javaee-web-api

/**
 * Signal to the authentication mechanism responding to the authenticate call in which these 
 * AuthenticationParameters are passed, that an explicit new authentication dialog is required, as opposed to
 * continuing a potentially existing one.
 * 
 * @param newAuthentication whether a new authentication dialog is required to be started.
 * 
 * @return the instance of AuthenticationParameters on which this call was made, useful for a fluent/builder
 * style creation of parameters.
 */
public AuthenticationParameters newAuthentication(boolean newAuthentication) {
  setNewAuthentication(newAuthentication);
  return this;
}
origin: javax/javaee-web-api

/**
 * Signals that for this call to the authentication mechanism "remember me" should be applied, IFF the
 * "remember me" feature is configured for the authentication mechanism responding to the authenticate call.
 * 
 * <p>
 * If "remember me" is not configured, this parameter is silently ignored.
 * 
 * @see RememberMe
 * @see RememberMeIdentityStore
 * 
 * @param rememberMe if <code>true</code> the "remember me" feature will be used if authentication succeeds and if so configured.
 * 
 * @return the instance of AuthenticationParameters on which this call was made, useful for a fluent/builder
 * style creation of parameters.
 */
public AuthenticationParameters rememberMe(boolean rememberMe) {
  setRememberMe(rememberMe);
  return this;
}
origin: org.glassfish.soteria/javax.security.enterprise

private static boolean hasCredential(HttpMessageContext httpMessageContext) {
  return 
    httpMessageContext.getAuthParameters().getCredential() != null;
}

origin: javaee/security-soteria

private void tryClean(HttpMessageContext httpMessageContext) {
  
  // 1. Check if caller aborted earlier flow and does a new request to protected resource
  if (isOnProtectedURLWithStaleData(httpMessageContext)) {
    removeSavedRequest(httpMessageContext.getRequest());
    removeCallerInitiatedAuthentication(httpMessageContext.getRequest());
  }
  
  // 2. Check if caller aborted earlier flow and explicitly initiated a new authentication dialog 
  if (httpMessageContext.getAuthParameters().isNewAuthentication()) {
    saveCallerInitiatedAuthentication(httpMessageContext.getRequest());
    removeSavedRequest(httpMessageContext.getRequest());
    removeSavedAuthentication(httpMessageContext.getRequest());
  }
}

origin: javax.security.enterprise/javax.security.enterprise-api

/**
 * Signals that for this call to the authentication mechanism "remember me" should be applied, IFF the
 * "remember me" feature is configured for the authentication mechanism responding to the authenticate call.
 * 
 * <p>
 * If "remember me" is not configured, this parameter is silently ignored.
 * 
 * @see RememberMe
 * @see RememberMeIdentityStore
 * 
 * @param rememberMe if <code>true</code> the "remember me" feature will be used if authentication succeeds and if so configured.
 * 
 * @return the instance of AuthenticationParameters on which this call was made, useful for a fluent/builder
 * style creation of parameters.
 */
public AuthenticationParameters rememberMe(boolean rememberMe) {
  setRememberMe(rememberMe);
  return this;
}
origin: javaee/security-soteria

private static boolean hasCredential(HttpMessageContext httpMessageContext) {
  return 
    httpMessageContext.getAuthParameters().getCredential() != null;
}

origin: org.glassfish.soteria/javax.security.enterprise

private void tryClean(HttpMessageContext httpMessageContext) {
  
  // 1. Check if caller aborted earlier flow and does a new request to protected resource
  if (isOnProtectedURLWithStaleData(httpMessageContext)) {
    removeSavedRequest(httpMessageContext.getRequest());
    removeCallerInitiatedAuthentication(httpMessageContext.getRequest());
  }
  
  // 2. Check if caller aborted earlier flow and explicitly initiated a new authentication dialog 
  if (httpMessageContext.getAuthParameters().isNewAuthentication()) {
    saveCallerInitiatedAuthentication(httpMessageContext.getRequest());
    removeSavedRequest(httpMessageContext.getRequest());
    removeSavedAuthentication(httpMessageContext.getRequest());
  }
}

origin: jakarta.security.enterprise/jakarta.security.enterprise-api

/**
 * Creates a new instance of AuthenticationParameters, useful for a fluent/builder
 * style creation of parameters.
 * 
 * @return a new AuthenticationParameters instance.
 */
public static AuthenticationParameters withParams() {
  return new AuthenticationParameters();
}
origin: javax.security.enterprise/javax.security.enterprise-api

/**
 * Sets the credential to be used by the authentication mechanism responding
 * to the authenticate call in which these AuthenticationParameters are passed.
 * 
 * @param credential the credential to be used by the authentication mechanism
 * 
 * @return the instance of AuthenticationParameters on which this call was made, useful for a fluent/builder
 * style creation of parameters.
 */
public AuthenticationParameters credential(Credential credential) {
  setCredential(credential);
  return this;
}
origin: javax.security.enterprise/javax.security.enterprise-api

/**
 * Signal to the authentication mechanism responding to the authenticate call in which these 
 * AuthenticationParameters are passed, that an explicit new authentication dialog is required, as opposed to
 * continuing a potentially existing one.
 * 
 * @param newAuthentication whether a new authentication dialog is required to be started.
 * 
 * @return the instance of AuthenticationParameters on which this call was made, useful for a fluent/builder
 * style creation of parameters.
 */
public AuthenticationParameters newAuthentication(boolean newAuthentication) {
  setNewAuthentication(newAuthentication);
  return this;
}
origin: jakarta.security.enterprise/jakarta.security.enterprise-api

/**
 * Signals that for this call to the authentication mechanism "remember me" should be applied, IFF the
 * "remember me" feature is configured for the authentication mechanism responding to the authenticate call.
 * 
 * <p>
 * If "remember me" is not configured, this parameter is silently ignored.
 * 
 * @see RememberMe
 * @see RememberMeIdentityStore
 * 
 * @param rememberMe if <code>true</code> the "remember me" feature will be used if authentication succeeds and if so configured.
 * 
 * @return the instance of AuthenticationParameters on which this call was made, useful for a fluent/builder
 * style creation of parameters.
 */
public AuthenticationParameters rememberMe(boolean rememberMe) {
  setRememberMe(rememberMe);
  return this;
}
origin: javaee/security-soteria

@Override
public AuthenticationStatus validateRequest(HttpServletRequest request, HttpServletResponse response, HttpMessageContext httpMessageContext) throws AuthenticationException {
  
  if (hasCredential(httpMessageContext)) {
    IdentityStoreHandler identityStoreHandler = CDI.current().select(IdentityStoreHandler.class).get();
    
    return httpMessageContext.notifyContainerAboutLogin(
        identityStoreHandler.validate(
        httpMessageContext.getAuthParameters()
                 .getCredential()));
  }
  
  return httpMessageContext.doNothing();
}

origin: javax.security.enterprise/javax.security.enterprise-api

/**
 * Creates a new instance of AuthenticationParameters, useful for a fluent/builder
 * style creation of parameters.
 * 
 * @return a new AuthenticationParameters instance.
 */
public static AuthenticationParameters withParams() {
  return new AuthenticationParameters();
}
origin: jakarta.security.enterprise/jakarta.security.enterprise-api

/**
 * Sets the credential to be used by the authentication mechanism responding
 * to the authenticate call in which these AuthenticationParameters are passed.
 * 
 * @param credential the credential to be used by the authentication mechanism
 * 
 * @return the instance of AuthenticationParameters on which this call was made, useful for a fluent/builder
 * style creation of parameters.
 */
public AuthenticationParameters credential(Credential credential) {
  setCredential(credential);
  return this;
}
origin: jakarta.security.enterprise/jakarta.security.enterprise-api

/**
 * Signal to the authentication mechanism responding to the authenticate call in which these 
 * AuthenticationParameters are passed, that an explicit new authentication dialog is required, as opposed to
 * continuing a potentially existing one.
 * 
 * @param newAuthentication whether a new authentication dialog is required to be started.
 * 
 * @return the instance of AuthenticationParameters on which this call was made, useful for a fluent/builder
 * style creation of parameters.
 */
public AuthenticationParameters newAuthentication(boolean newAuthentication) {
  setNewAuthentication(newAuthentication);
  return this;
}
origin: jboss/jboss-javaee-specs

/**
 * Signals that for this call to the authentication mechanism "remember me" should be applied, IFF the
 * "remember me" feature is configured for the authentication mechanism responding to the authenticate call.
 * 
 * <p>
 * If "remember me" is not configured, this parameter is silently ignored.
 * 
 * @see RememberMe
 * @see RememberMeIdentityStore
 * 
 * @param rememberMe if <code>true</code> the "remember me" feature will be used if authentication succeeds and if so configured.
 * 
 * @return the instance of AuthenticationParameters on which this call was made, useful for a fluent/builder
 * style creation of parameters.
 */
public AuthenticationParameters rememberMe(boolean rememberMe) {
  setRememberMe(rememberMe);
  return this;
}
origin: org.glassfish.soteria/javax.security.enterprise

@Override
public AuthenticationStatus validateRequest(HttpServletRequest request, HttpServletResponse response, HttpMessageContext httpMessageContext) throws AuthenticationException {
  
  if (hasCredential(httpMessageContext)) {
    IdentityStoreHandler identityStoreHandler = CDI.current().select(IdentityStoreHandler.class).get();
    
    return httpMessageContext.notifyContainerAboutLogin(
        identityStoreHandler.validate(
        httpMessageContext.getAuthParameters()
                 .getCredential()));
  }
  
  return httpMessageContext.doNothing();
}

origin: jboss/jboss-javaee-specs

/**
 * Creates a new instance of AuthenticationParameters, useful for a fluent/builder
 * style creation of parameters.
 * 
 * @return a new AuthenticationParameters instance.
 */
public static AuthenticationParameters withParams() {
  return new AuthenticationParameters();
}
javax.security.enterprise.authentication.mechanism.httpAuthenticationParameters

Javadoc

Parameters that are provided along with an authentication request.

Most used methods

  • <init>
  • setCredential
    Sets the credential as parameter in this instance.
  • setNewAuthentication
    Sets whether a new authentication dialog is required.
  • setRememberMe
    Sets whether "remember me" should be used.
  • getCredential
    The credential set as parameter in this instance.
  • isNewAuthentication
    Whether a new authentication dialog is required.

Popular in Java

  • Creating JSON documents from java classes using gson
  • setContentView (Activity)
  • putExtra (Intent)
  • onCreateOptionsMenu (Activity)
  • Menu (java.awt)
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • From CI to AI: The AI layer in your organization
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