Tabnine Logo
WatchableGroovyScriptResource.getResource
Code IndexAdd Tabnine to your IDE (free)

How to use
getResource
method
in
org.apereo.cas.util.scripting.WatchableGroovyScriptResource

Best Java code snippets using org.apereo.cas.util.scripting.WatchableGroovyScriptResource.getResource (Showing top 2 results out of 315)

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

  @Override
  public boolean shouldMultifactorAuthenticationProviderExecute(final Authentication authentication,
                                 final RegisteredService registeredService,
                                 final MultifactorAuthenticationProvider provider,
                                 final HttpServletRequest request) {
    try {
      val principal = authentication.getPrincipal();
      LOGGER.debug("Evaluating multifactor authentication bypass properties for principal [{}], "
          + "service [{}] and provider [{}] via Groovy script [{}]",
        principal.getId(), registeredService, provider, watchableScript.getResource());
      val args = new Object[]{authentication, principal, registeredService, provider, LOGGER, request};
      return watchableScript.execute(args, Boolean.class);
    } catch (final Exception e) {
      LOGGER.error(e.getMessage(), e);
      return true;
    }
  }
}
origin: org.apereo.cas/cas-server-support-interrupt-core

  @Override
  public InterruptResponse inquireInternal(final Authentication authentication,
                       final RegisteredService registeredService,
                       final Service service, final Credential credential,
                       final RequestContext requestContext) {
    if (ResourceUtils.doesResourceExist(watchableScript.getResource())) {
      val principal = authentication.getPrincipal();
      val attributes = new HashMap<String, Object>(principal.getAttributes());
      attributes.putAll(authentication.getAttributes());
      final Object[] args = {principal.getId(), attributes, service != null ? service.getId() : null, LOGGER};
      return watchableScript.execute(args, InterruptResponse.class);
    }
    return InterruptResponse.none();
  }
}
org.apereo.cas.util.scriptingWatchableGroovyScriptResourcegetResource

Popular methods of WatchableGroovyScriptResource

  • <init>
  • execute
    Execute.
  • compileScriptResource

Popular in Java

  • Reading from database using SQL prepared statement
  • putExtra (Intent)
  • requestLocationUpdates (LocationManager)
  • getApplicationContext (Context)
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • 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
  • Reference (javax.naming)
  • JComboBox (javax.swing)
  • Top 17 PhpStorm Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now