Class ExternalAuthenticationService

  • All Implemented Interfaces:
    java.io.Serializable

    @ApplicationScoped
    public class ExternalAuthenticationService
    extends io.jans.service.custom.script.ExternalScriptService
    Provides factory methods needed to create external authenticator
    Author:
    Yuriy Movchan Date: 21/08/2012
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String MODIFIED_INTERNAL_TYPES_EVENT_TYPE  
      • Fields inherited from class io.jans.service.custom.script.ExternalScriptService

        customScriptConfigurations, customScriptConfigurationsNameMap, customScriptManager, customScriptType, defaultExternalCustomScript, loaded, log
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Map<java.lang.String,​java.lang.Integer> acrToLevelMapping()  
      protected void addExternalConfigurations​(java.util.List<io.jans.model.custom.script.conf.CustomScriptConfiguration> newCustomScriptConfigurations)  
      io.jans.model.custom.script.conf.CustomScriptConfiguration determineCustomScriptConfiguration​(io.jans.model.AuthenticationScriptUsageType usageType, int authStep, java.lang.String acr)  
      io.jans.model.custom.script.conf.CustomScriptConfiguration determineCustomScriptConfiguration​(io.jans.model.AuthenticationScriptUsageType usageType, java.util.List<java.lang.String> acrValues)  
      io.jans.model.custom.script.conf.CustomScriptConfiguration determineExternalAuthenticatorForWorkflow​(io.jans.model.AuthenticationScriptUsageType usageType, io.jans.model.custom.script.conf.CustomScriptConfiguration customScriptConfiguration)  
      boolean executeExternalAuthenticate​(io.jans.model.custom.script.conf.CustomScriptConfiguration customScriptConfiguration, java.util.Map<java.lang.String,​java.lang.String[]> requestParameters, int step)  
      int executeExternalGetApiVersion​(io.jans.model.custom.script.conf.CustomScriptConfiguration customScriptConfiguration)  
      int executeExternalGetCountAuthenticationSteps​(io.jans.model.custom.script.conf.CustomScriptConfiguration customScriptConfiguration)  
      java.util.List<java.lang.String> executeExternalGetExtraParametersForStep​(io.jans.model.custom.script.conf.CustomScriptConfiguration customScriptConfiguration, int step)  
      java.lang.String executeExternalGetPageForStep​(io.jans.model.custom.script.conf.CustomScriptConfiguration customScriptConfiguration, int step)  
      boolean executeExternalLogout​(io.jans.model.custom.script.conf.CustomScriptConfiguration customScriptConfiguration, java.util.Map<java.lang.String,​java.lang.String[]> requestParameters)  
      boolean executeExternalPrepareForStep​(io.jans.model.custom.script.conf.CustomScriptConfiguration customScriptConfiguration, java.util.Map<java.lang.String,​java.lang.String[]> requestParameters, int step)  
      java.util.List<java.lang.String> getAcrValuesList()  
      java.util.List<java.lang.String> getAuthModesByAcrValues​(java.util.List<java.lang.String> acrValues)  
      io.jans.model.custom.script.conf.CustomScriptConfiguration getCustomScriptConfiguration​(io.jans.model.AuthenticationScriptUsageType usageType, java.lang.String name)  
      io.jans.model.custom.script.conf.CustomScriptConfiguration getCustomScriptConfigurationByName​(java.lang.String name)  
      java.util.List<io.jans.model.custom.script.conf.CustomScriptConfiguration> getCustomScriptConfigurationsMap()  
      io.jans.model.custom.script.conf.CustomScriptConfiguration getDefaultExternalAuthenticator​(io.jans.model.AuthenticationScriptUsageType usageType)  
      io.jans.model.custom.script.conf.CustomScriptConfiguration getExternalAuthenticatorByAuthLevel​(io.jans.model.AuthenticationScriptUsageType usageType, int authLevel)  
      java.lang.String getLogoutExternalUrl​(io.jans.model.custom.script.conf.CustomScriptConfiguration customScriptConfiguration, java.util.Map<java.lang.String,​java.lang.String[]> requestParameters)  
      int getNextStep​(io.jans.model.custom.script.conf.CustomScriptConfiguration customScriptConfiguration, java.util.Map<java.lang.String,​java.lang.String[]> requestParameters, int step)  
      boolean isEnabled​(io.jans.model.AuthenticationScriptUsageType usageType)  
      java.util.Map<java.lang.Integer,​java.util.Set<java.lang.String>> levelToAcrMapping()  
      void reloadAuthScript​(java.lang.String event)  
      protected void reloadExternal()  
      java.lang.String scriptName​(java.lang.String acr)  
      void setCustomScriptConfigurationsMapByUsageType​(java.util.Map<io.jans.model.AuthenticationScriptUsageType,​java.util.List<io.jans.model.custom.script.conf.CustomScriptConfiguration>> customScriptConfigurationsMapByUsageType)  
      void setDefaultExternalAuthenticators​(java.util.Map<io.jans.model.AuthenticationScriptUsageType,​io.jans.model.custom.script.conf.CustomScriptConfiguration> defaultExternalAuthenticators)  
      • Methods inherited from class io.jans.service.custom.script.ExternalScriptService

        clearScriptError, configure, determineDefaultCustomScriptConfiguration, getCustomScriptConfigurations, getCustomScriptConfigurationsByDns, getCustomScriptType, getDefaultExternalCustomScript, init, isEnabled, isLoaded, reload, saveScriptError
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • MODIFIED_INTERNAL_TYPES_EVENT_TYPE

        public static final java.lang.String MODIFIED_INTERNAL_TYPES_EVENT_TYPE
        See Also:
        Constant Field Values
    • Constructor Detail

      • ExternalAuthenticationService

        public ExternalAuthenticationService()
    • Method Detail

      • reloadAuthScript

        public void reloadAuthScript​(@Observes @ReloadAuthScript
                                     java.lang.String event)
      • scriptName

        public java.lang.String scriptName​(java.lang.String acr)
      • reloadExternal

        protected void reloadExternal()
        Overrides:
        reloadExternal in class io.jans.service.custom.script.ExternalScriptService
      • addExternalConfigurations

        protected void addExternalConfigurations​(java.util.List<io.jans.model.custom.script.conf.CustomScriptConfiguration> newCustomScriptConfigurations)
        Overrides:
        addExternalConfigurations in class io.jans.service.custom.script.ExternalScriptService
      • executeExternalGetCountAuthenticationSteps

        public int executeExternalGetCountAuthenticationSteps​(io.jans.model.custom.script.conf.CustomScriptConfiguration customScriptConfiguration)
      • executeExternalAuthenticate

        public boolean executeExternalAuthenticate​(io.jans.model.custom.script.conf.CustomScriptConfiguration customScriptConfiguration,
                                                   java.util.Map<java.lang.String,​java.lang.String[]> requestParameters,
                                                   int step)
      • getNextStep

        public int getNextStep​(io.jans.model.custom.script.conf.CustomScriptConfiguration customScriptConfiguration,
                               java.util.Map<java.lang.String,​java.lang.String[]> requestParameters,
                               int step)
      • executeExternalLogout

        public boolean executeExternalLogout​(io.jans.model.custom.script.conf.CustomScriptConfiguration customScriptConfiguration,
                                             java.util.Map<java.lang.String,​java.lang.String[]> requestParameters)
      • getLogoutExternalUrl

        public java.lang.String getLogoutExternalUrl​(io.jans.model.custom.script.conf.CustomScriptConfiguration customScriptConfiguration,
                                                     java.util.Map<java.lang.String,​java.lang.String[]> requestParameters)
      • executeExternalPrepareForStep

        public boolean executeExternalPrepareForStep​(io.jans.model.custom.script.conf.CustomScriptConfiguration customScriptConfiguration,
                                                     java.util.Map<java.lang.String,​java.lang.String[]> requestParameters,
                                                     int step)
      • executeExternalGetExtraParametersForStep

        public java.util.List<java.lang.String> executeExternalGetExtraParametersForStep​(io.jans.model.custom.script.conf.CustomScriptConfiguration customScriptConfiguration,
                                                                                         int step)
      • executeExternalGetPageForStep

        public java.lang.String executeExternalGetPageForStep​(io.jans.model.custom.script.conf.CustomScriptConfiguration customScriptConfiguration,
                                                              int step)
      • executeExternalGetApiVersion

        public int executeExternalGetApiVersion​(io.jans.model.custom.script.conf.CustomScriptConfiguration customScriptConfiguration)
        Overrides:
        executeExternalGetApiVersion in class io.jans.service.custom.script.ExternalScriptService
      • isEnabled

        public boolean isEnabled​(io.jans.model.AuthenticationScriptUsageType usageType)
      • getExternalAuthenticatorByAuthLevel

        public io.jans.model.custom.script.conf.CustomScriptConfiguration getExternalAuthenticatorByAuthLevel​(io.jans.model.AuthenticationScriptUsageType usageType,
                                                                                                              int authLevel)
      • determineCustomScriptConfiguration

        public io.jans.model.custom.script.conf.CustomScriptConfiguration determineCustomScriptConfiguration​(io.jans.model.AuthenticationScriptUsageType usageType,
                                                                                                             int authStep,
                                                                                                             java.lang.String acr)
      • determineCustomScriptConfiguration

        public io.jans.model.custom.script.conf.CustomScriptConfiguration determineCustomScriptConfiguration​(io.jans.model.AuthenticationScriptUsageType usageType,
                                                                                                             java.util.List<java.lang.String> acrValues)
      • getAuthModesByAcrValues

        public java.util.List<java.lang.String> getAuthModesByAcrValues​(java.util.List<java.lang.String> acrValues)
      • determineExternalAuthenticatorForWorkflow

        public io.jans.model.custom.script.conf.CustomScriptConfiguration determineExternalAuthenticatorForWorkflow​(io.jans.model.AuthenticationScriptUsageType usageType,
                                                                                                                    io.jans.model.custom.script.conf.CustomScriptConfiguration customScriptConfiguration)
      • getDefaultExternalAuthenticator

        public io.jans.model.custom.script.conf.CustomScriptConfiguration getDefaultExternalAuthenticator​(io.jans.model.AuthenticationScriptUsageType usageType)
      • getCustomScriptConfiguration

        public io.jans.model.custom.script.conf.CustomScriptConfiguration getCustomScriptConfiguration​(io.jans.model.AuthenticationScriptUsageType usageType,
                                                                                                       java.lang.String name)
      • getCustomScriptConfigurationByName

        public io.jans.model.custom.script.conf.CustomScriptConfiguration getCustomScriptConfigurationByName​(java.lang.String name)
        Overrides:
        getCustomScriptConfigurationByName in class io.jans.service.custom.script.ExternalScriptService
      • getCustomScriptConfigurationsMap

        public java.util.List<io.jans.model.custom.script.conf.CustomScriptConfiguration> getCustomScriptConfigurationsMap()
      • getAcrValuesList

        public java.util.List<java.lang.String> getAcrValuesList()
      • levelToAcrMapping

        public java.util.Map<java.lang.Integer,​java.util.Set<java.lang.String>> levelToAcrMapping()
      • acrToLevelMapping

        public java.util.Map<java.lang.String,​java.lang.Integer> acrToLevelMapping()
      • setCustomScriptConfigurationsMapByUsageType

        public void setCustomScriptConfigurationsMapByUsageType​(java.util.Map<io.jans.model.AuthenticationScriptUsageType,​java.util.List<io.jans.model.custom.script.conf.CustomScriptConfiguration>> customScriptConfigurationsMapByUsageType)
      • setDefaultExternalAuthenticators

        public void setDefaultExternalAuthenticators​(java.util.Map<io.jans.model.AuthenticationScriptUsageType,​io.jans.model.custom.script.conf.CustomScriptConfiguration> defaultExternalAuthenticators)