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

How to use
BasicCredentialMetaData
in
org.apereo.cas.authentication.metadata

Best Java code snippets using org.apereo.cas.authentication.metadata.BasicCredentialMetaData (Showing top 7 results out of 315)

origin: org.apereo.cas/cas-server-core-authentication-api

/**
 * Helper method to construct a handler result
 * on successful authentication events.
 *
 * @param credential the credential on which the authentication was successfully performed.
 *                   Note that this credential instance may be different from what was originally provided
 *                   as transformation of the username may have occurred, if one is in fact defined.
 * @param principal  the resolved principal
 * @param warnings   the warnings
 * @return the constructed handler result
 */
protected AuthenticationHandlerExecutionResult createHandlerResult(final @NonNull Credential credential,
                                  final @NonNull Principal principal,
                                  final List<MessageDescriptor> warnings) {
  return new DefaultAuthenticationHandlerExecutionResult(this, new BasicCredentialMetaData(credential), principal, warnings);
}
origin: org.apereo.cas/cas-server-core-authentication-api

  /**
   * Helper method to construct a handler result
   * on successful authentication events.
   *
   * @param credential the credential on which the authentication was successfully performed.
   *                   Note that this credential instance may be different from what was originally provided
   *                   as transformation of the username may have occurred, if one is in fact defined.
   * @param principal  the resolved principal
   * @return the constructed handler result
   */
  protected AuthenticationHandlerExecutionResult createHandlerResult(final @NonNull Credential credential,
                                    final @NonNull Principal principal) {
    return new DefaultAuthenticationHandlerExecutionResult(this, new BasicCredentialMetaData(credential),
      principal, new ArrayList<>(0));
  }
}
origin: org.apereo.cas/cas-server-support-openid

@Override
public AuthenticationHandlerExecutionResult authenticate(final Credential credential) throws GeneralSecurityException {
  val c = (OpenIdCredential) credential;
  val t = this.ticketRegistry.getTicket(c.getTicketGrantingTicketId(), TicketGrantingTicket.class);
  if (t == null || t.isExpired()) {
    throw new FailedLoginException("Ticket-granting ticket is null or expired.");
  }
  val principal = t.getAuthentication().getPrincipal();
  if (!principal.getId().equals(c.getUsername())) {
    throw new FailedLoginException("Principal ID mismatch");
  }
  return new DefaultAuthenticationHandlerExecutionResult(this, new BasicCredentialMetaData(c), principal);
}
origin: org.apereo.cas/cas-server-support-spnego

  throw new FailedLoginException("Principal is null, the processing of the SPNEGO Token failed");
return new DefaultAuthenticationHandlerExecutionResult(this, new BasicCredentialMetaData(credential), spnegoCredential.getPrincipal());
origin: org.apereo.cas/cas-server-core-authentication-api

credentials.forEach(cred -> builder.addCredential(new BasicCredentialMetaData(cred)));
origin: org.apereo.cas/cas-server-support-oauth

val metadata = new BasicCredentialMetaData(new BasicIdentifiableCredential(profile.getId()));
val handlerResult = new DefaultAuthenticationHandlerExecutionResult(authenticator, metadata, newPrincipal, new ArrayList<>());
val scopes = CollectionUtils.toCollection(context.getRequest().getParameterValues(OAuth20Constants.SCOPE));
origin: org.apereo.cas/cas-server-support-spnego

  throw new FailedLoginException();
return new DefaultAuthenticationHandlerExecutionResult(this, new BasicCredentialMetaData(ntlmCredential), ntlmCredential.getPrincipal());
org.apereo.cas.authentication.metadataBasicCredentialMetaData

Javadoc

Basic credential metadata implementation that stores the original credential ID and the original credential type. This can be used as a simple converter for any Credential that doesn't implement CredentialMetaData.

Most used methods

  • <init>
    Creates a new instance from the given credential.

Popular in Java

  • Making http requests using okhttp
  • getSharedPreferences (Context)
  • findViewById (Activity)
  • scheduleAtFixedRate (Timer)
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • 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