Tabnine Logo
CredentialValidationResult.getStatus
Code IndexAdd Tabnine to your IDE (free)

How to use
getStatus
method
in
javax.security.enterprise.identitystore.CredentialValidationResult

Best Java code snippets using javax.security.enterprise.identitystore.CredentialValidationResult.getStatus (Showing top 9 results out of 315)

origin: javaee/security-soteria

@Override
public AuthenticationStatus notifyContainerAboutLogin(CredentialValidationResult result) {
  if (result.getStatus() == VALID) {
    return notifyContainerAboutLogin(
        result.getCallerPrincipal(),
        result.getCallerGroups());
  } 
    
  return SEND_FAILURE;
}
origin: org.glassfish.soteria/javax.security.enterprise

@Override
public AuthenticationStatus notifyContainerAboutLogin(CredentialValidationResult result) {
  if (result.getStatus() == VALID) {
    return notifyContainerAboutLogin(
        result.getCallerPrincipal(),
        result.getCallerGroups());
  } 
    
  return SEND_FAILURE;
}
origin: org.glassfish.soteria/javax.security.enterprise

  if (validationResult.getStatus() == VALID) {
    identityStore = authenticationIdentityStore;
    break;
  else if (validationResult.getStatus() == INVALID) {
    isGotAnInvalidResult = true;
if (validationResult == null || validationResult.getStatus() != VALID) {
origin: javaee/security-soteria

  if (validationResult.getStatus() == VALID) {
    identityStore = authenticationIdentityStore;
    break;
  else if (validationResult.getStatus() == INVALID) {
    isGotAnInvalidResult = true;
if (validationResult == null || validationResult.getStatus() != VALID) {
origin: javaee-samples/javaee8-samples

if (result.getStatus() == CredentialValidationResult.Status.VALID) {
origin: javaee/security-soteria

@Override
public AuthenticationStatus validateRequest(HttpServletRequest request, HttpServletResponse response, HttpMessageContext httpMsgContext) throws AuthenticationException {
  String[] credentials = getCredentials(request);
  if (!isEmpty(credentials)) {
    IdentityStoreHandler identityStoreHandler = CDI.current().select(IdentityStoreHandler.class).get();
    CredentialValidationResult result = identityStoreHandler.validate(
        new UsernamePasswordCredential(credentials[0], new Password(credentials[1])));
    if (result.getStatus() == VALID) {
      return httpMsgContext.notifyContainerAboutLogin(
        result.getCallerPrincipal(), result.getCallerGroups());
    }
  }
  if (httpMsgContext.isProtected()) {
    response.setHeader("WWW-Authenticate", format("Basic realm=\"%s\"", basicAuthenticationMechanismDefinition.realmName()));
    return httpMsgContext.responseUnauthorized();
  }
  return httpMsgContext.doNothing();
}
origin: org.glassfish.soteria/javax.security.enterprise

@Override
public AuthenticationStatus validateRequest(HttpServletRequest request, HttpServletResponse response, HttpMessageContext httpMsgContext) throws AuthenticationException {
  String[] credentials = getCredentials(request);
  if (!isEmpty(credentials)) {
    IdentityStoreHandler identityStoreHandler = CDI.current().select(IdentityStoreHandler.class).get();
    CredentialValidationResult result = identityStoreHandler.validate(
        new UsernamePasswordCredential(credentials[0], new Password(credentials[1])));
    if (result.getStatus() == VALID) {
      return httpMsgContext.notifyContainerAboutLogin(
        result.getCallerPrincipal(), result.getCallerGroups());
    }
  }
  if (httpMsgContext.isProtected()) {
    response.setHeader("WWW-Authenticate", format("Basic realm=\"%s\"", basicAuthenticationMechanismDefinition.realmName()));
    return httpMsgContext.responseUnauthorized();
  }
  return httpMsgContext.doNothing();
}
origin: org.glassfish.soteria/javax.security.enterprise

);
if (result.getStatus() == VALID) {
origin: javaee/security-soteria

);
if (result.getStatus() == VALID) {
javax.security.enterprise.identitystoreCredentialValidationResultgetStatus

Javadoc

Determines the validation status.

Popular methods of CredentialValidationResult

  • <init>
    Private constructor.
  • getCallerGroups
    Determines the set of groups that the specified Caller is in, based on the associated identity store
  • getCallerPrincipal
    Return the CallerPrincipal for the validated credential.
  • getCallerDn
    Return the CallerPrincipal for the validated credential.
  • getCallerUniqueId
    Return a string that uniquely identifies this caller within the identity store (since the Principal
  • getIdentityStoreId
    Return the unique ID of the identity store used to validate the credentials.

Popular in Java

  • Creating JSON documents from java classes using gson
  • runOnUiThread (Activity)
  • getSystemService (Context)
  • onRequestPermissionsResult (Fragment)
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • JPanel (javax.swing)
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • Top PhpStorm 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