keycloak
公開メンバ関数 | 静的公開変数類 | 静的変数 | 静的非公開変数類 | 全メンバ一覧
org.keycloak.authentication.authenticators.browser.ScriptBasedAuthenticatorFactory クラス
org.keycloak.authentication.authenticators.browser.ScriptBasedAuthenticatorFactory の継承関係図
Inheritance graph
org.keycloak.authentication.authenticators.browser.ScriptBasedAuthenticatorFactory 連携図
Collaboration graph

公開メンバ関数

Authenticator create (KeycloakSession session)
 
void init (Config.Scope config)
 
void postInit (KeycloakSessionFactory factory)
 
void close ()
 
String getId ()
 
String getReferenceCategory ()
 
boolean isConfigurable ()
 
boolean isUserSetupAllowed ()
 
AuthenticationExecutionModel.Requirement [] getRequirementChoices ()
 
String getDisplayType ()
 
String getHelpText ()
 
List< ProviderConfigPropertygetConfigProperties ()
 
boolean isSupported ()
 
default int order ()
 

静的公開変数類

static final String PROVIDER_ID = "auth-script-based"
 

静的変数

static final AuthenticationExecutionModel.Requirement [] REQUIREMENT_CHOICES
 
static final ScriptBasedAuthenticator SINGLETON = new ScriptBasedAuthenticator()
 

静的非公開変数類

static final Logger LOGGER = Logger.getLogger(ScriptBasedAuthenticatorFactory.class)
 

詳解

An AuthenticatorFactory for ScriptBasedAuthenticators.

著者
Thomas Darimont

関数詳解

◆ close()

void org.keycloak.authentication.authenticators.browser.ScriptBasedAuthenticatorFactory.close ( )
inline

org.keycloak.provider.ProviderFactory< T extends Provider >を実装しています。

82  {
83  //NOOP
84  }

◆ create()

Authenticator org.keycloak.authentication.authenticators.browser.ScriptBasedAuthenticatorFactory.create ( KeycloakSession  session)
inline

org.keycloak.provider.ProviderFactory< T extends Provider >を実装しています。

60  {
61 
62  /*
63  would be great to have the actual authenticatorId here in order to initialize the authenticator in the ctor with
64  the appropriate config from session.getContext().getRealm().getAuthenticatorConfigById(authenticatorId);
65 
66  This would help to avoid potentially re-evaluating the provide script multiple times per authenticator execution.
67  */
68  return SINGLETON;
69  }
static final ScriptBasedAuthenticator SINGLETON
Definition: ScriptBasedAuthenticatorFactory.java:57

◆ getConfigProperties()

List<ProviderConfigProperty> org.keycloak.authentication.authenticators.browser.ScriptBasedAuthenticatorFactory.getConfigProperties ( )
inline

org.keycloak.provider.ConfiguredProviderを実装しています。

122  {
123 
124  ProviderConfigProperty name = new ProviderConfigProperty();
125  name.setType(STRING_TYPE);
126  name.setName(SCRIPT_NAME);
127  name.setLabel("Script Name");
128  name.setHelpText("The name of the script used to authenticate.");
129 
130  ProviderConfigProperty description = new ProviderConfigProperty();
131  description.setType(STRING_TYPE);
132  description.setName(SCRIPT_DESCRIPTION);
133  description.setLabel("Script Description");
134  description.setHelpText("The description of the script used to authenticate.");
135 
136  ProviderConfigProperty script = new ProviderConfigProperty();
137  script.setType(SCRIPT_TYPE);
138  script.setName(SCRIPT_CODE);
139  script.setLabel("Script Source");
140 
141  String scriptTemplate = "//enter your script code here";
142  try {
143  scriptTemplate = StreamUtil.readString(getClass().getResourceAsStream("/scripts/authenticator-template.js"));
144  } catch (IOException ioe) {
145  LOGGER.warn(ioe);
146  }
147  script.setDefaultValue(scriptTemplate);
148  script.setHelpText("The script used to authenticate. Scripts must at least define a function with the name 'authenticate(context)' that accepts a context (AuthenticationFlowContext) parameter.\n" +
149  "This authenticator exposes the following additional variables: 'script', 'realm', 'user', 'session', 'authenticationSession', 'httpRequest', 'LOG'");
150 
151  return asList(name, description, script);
152  }
static final Logger LOGGER
Definition: ScriptBasedAuthenticatorFactory.java:48

◆ getDisplayType()

String org.keycloak.authentication.authenticators.browser.ScriptBasedAuthenticatorFactory.getDisplayType ( )
inline

org.keycloak.authentication.ConfigurableAuthenticatorFactoryを実装しています。

112  {
113  return "Script";
114  }

◆ getHelpText()

String org.keycloak.authentication.authenticators.browser.ScriptBasedAuthenticatorFactory.getHelpText ( )
inline

org.keycloak.provider.ConfiguredProviderを実装しています。

117  {
118  return "Script based authentication. Allows to define custom authentication logic via JavaScript.";
119  }

◆ getId()

String org.keycloak.authentication.authenticators.browser.ScriptBasedAuthenticatorFactory.getId ( )
inline

org.keycloak.provider.ProviderFactory< T extends Provider >を実装しています。

87  {
88  return PROVIDER_ID;
89  }
static final String PROVIDER_ID
Definition: ScriptBasedAuthenticatorFactory.java:50

◆ getReferenceCategory()

String org.keycloak.authentication.authenticators.browser.ScriptBasedAuthenticatorFactory.getReferenceCategory ( )
inline

org.keycloak.authentication.ConfigurableAuthenticatorFactoryを実装しています。

92  {
93  return "script";
94  }

◆ getRequirementChoices()

AuthenticationExecutionModel.Requirement [] org.keycloak.authentication.authenticators.browser.ScriptBasedAuthenticatorFactory.getRequirementChoices ( )
inline

org.keycloak.authentication.ConfigurableAuthenticatorFactoryを実装しています。

107  {
108  return REQUIREMENT_CHOICES;
109  }
static final AuthenticationExecutionModel.Requirement [] REQUIREMENT_CHOICES
Definition: ScriptBasedAuthenticatorFactory.java:52

◆ init()

void org.keycloak.authentication.authenticators.browser.ScriptBasedAuthenticatorFactory.init ( Config.Scope  config)
inline

org.keycloak.provider.ProviderFactory< T extends Provider >を実装しています。

72  {
73  //NOOP
74  }

◆ isConfigurable()

boolean org.keycloak.authentication.authenticators.browser.ScriptBasedAuthenticatorFactory.isConfigurable ( )
inline

org.keycloak.authentication.ConfigurableAuthenticatorFactoryを実装しています。

97  {
98  return true;
99  }

◆ isSupported()

boolean org.keycloak.authentication.authenticators.browser.ScriptBasedAuthenticatorFactory.isSupported ( )
inline

org.keycloak.provider.EnvironmentDependentProviderFactoryを実装しています。

155  {
156  return Profile.isFeatureEnabled(Profile.Feature.SCRIPTS);
157  }

◆ isUserSetupAllowed()

boolean org.keycloak.authentication.authenticators.browser.ScriptBasedAuthenticatorFactory.isUserSetupAllowed ( )
inline

org.keycloak.authentication.ConfigurableAuthenticatorFactoryを実装しています。

102  {
103  return true;
104  }

◆ order()

default int org.keycloak.provider.ProviderFactory< T extends Provider >.order ( )
inlineinherited

◆ postInit()

void org.keycloak.authentication.authenticators.browser.ScriptBasedAuthenticatorFactory.postInit ( KeycloakSessionFactory  factory)
inline

org.keycloak.provider.ProviderFactory< T extends Provider >を実装しています。

77  {
78  //NOOP
79  }

メンバ詳解

◆ LOGGER

final Logger org.keycloak.authentication.authenticators.browser.ScriptBasedAuthenticatorFactory.LOGGER = Logger.getLogger(ScriptBasedAuthenticatorFactory.class)
staticprivate

◆ PROVIDER_ID

final String org.keycloak.authentication.authenticators.browser.ScriptBasedAuthenticatorFactory.PROVIDER_ID = "auth-script-based"
static

◆ REQUIREMENT_CHOICES

final AuthenticationExecutionModel.Requirement [] org.keycloak.authentication.authenticators.browser.ScriptBasedAuthenticatorFactory.REQUIREMENT_CHOICES
staticpackage
初期値:
= {
AuthenticationExecutionModel.Requirement.REQUIRED,
AuthenticationExecutionModel.Requirement.OPTIONAL,
AuthenticationExecutionModel.Requirement.DISABLED}

◆ SINGLETON

final ScriptBasedAuthenticator org.keycloak.authentication.authenticators.browser.ScriptBasedAuthenticatorFactory.SINGLETON = new ScriptBasedAuthenticator()
staticpackage

このクラス詳解は次のファイルから抽出されました: