Codota Logo
CredentialValidationResult.getCallerGroups
Code IndexAdd Codota to your IDE (free)

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

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

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ScheduledThreadPoolExecutor s =
  • Codota Iconnew ScheduledThreadPoolExecutor(corePoolSize)
  • Codota IconThreadFactory threadFactory;new ScheduledThreadPoolExecutor(corePoolSize, threadFactory)
  • Codota IconString str;new ScheduledThreadPoolExecutor(1, new ThreadFactoryBuilder().setNameFormat(str).build())
  • Smart code suggestions by Codota
}
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: javaee-samples/javaee8-samples

/**
 * Create the JWT using CredentialValidationResult received from
 * IdentityStoreHandler
 *
 * @param result the result from validation of UsernamePasswordCredential
 * @param context
 * @return the AuthenticationStatus to notify the container
 */
private AuthenticationStatus createToken(CredentialValidationResult result, HttpMessageContext context) {
  if (!isRememberMe(context)) {
    String jwt = tokenProvider.createToken(result.getCallerPrincipal().getName(), result.getCallerGroups(), false);
    context.getResponse().setHeader(AUTHORIZATION_HEADER, BEARER + jwt);
  }
  return context.notifyContainerAboutLogin(result.getCallerPrincipal(), result.getCallerGroups());
}
origin: org.glassfish.soteria/javax.security.enterprise

groups.addAll(validationResult.getCallerGroups());
origin: javaee/security-soteria

groups.addAll(validationResult.getCallerGroups());
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

    result.getCallerPrincipal(), result.getCallerGroups());
} else {
origin: javaee/security-soteria

    result.getCallerPrincipal(), result.getCallerGroups());
} else {
javax.security.enterprise.identitystoreCredentialValidationResultgetCallerGroups

Javadoc

Determines the set of groups that the specified Caller is in, based on the associated identity store.

Popular methods of CredentialValidationResult

  • <init>
    Private constructor.
  • getCallerPrincipal
    Return the CallerPrincipal for the validated credential.
  • getStatus
    Determines the validation status.
  • 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

  • Start an intent from android
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getApplicationContext (Context)
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate(i
  • BitSet (java.util)
    This class implements a vector of bits that grows as needed. Each component of the bit set has a boo
  • HashSet (java.util)
    This class implements the Set interface, backed by a hash table (actually a HashMap instance). It m
  • Notification (javax.management)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now