本文整理汇总了Java中org.keycloak.Config类的典型用法代码示例。如果您正苦于以下问题:Java Config类的具体用法?Java Config怎么用?Java Config使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Config类属于org.keycloak包,在下文中一共展示了Config类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: setup
import org.keycloak.Config; //导入依赖的package包/类
@Before
public void setup() {
keycloakSession = mock(KeycloakSession.class);
KeycloakTransactionManager txnManager = mock(KeycloakTransactionManager.class);
when(keycloakSession.getTransactionManager()).thenReturn(txnManager);
RealmProvider realms = mock(RealmProvider.class);
when(keycloakSession.realms()).thenReturn(realms);
RealmModel realm = mock(RealmModel.class);
when(realms.getRealmByName(eq("realm"))).thenReturn(realm);
UserProvider userProvider = mock(UserProvider.class);
UserModel user = mock(UserModel.class);
when(userProvider.getUserByUsername(eq("user"), eq(realm))).thenReturn(user);
when(keycloakSession.userStorageManager()).thenReturn(userProvider);
UserCredentialManager userCredentialManager = mock(UserCredentialManager.class);
when(keycloakSession.userCredentialManager()).thenReturn(userCredentialManager);
when(userCredentialManager.isValid(eq(realm), eq(user), argThat(new PasswordCredentialMatcher("password")))).thenReturn(true);
config = mock(Config.Scope.class);
}
开发者ID:EnMasseProject,项目名称:enmasse,代码行数:20,代码来源:PlainSaslServerMechanismTest.java
示例2: init
import org.keycloak.Config; //导入依赖的package包/类
@Override
public void init(Config.Scope config) {
String eventsDirectoryConfigVal = config.get("eventsDirectory");
if (eventsDirectoryConfigVal != null && !eventsDirectoryConfigVal.isEmpty()) {
logger.debug("Using events directory from configuration file: " + eventsDirectoryConfigVal);
this.eventsDirectory = eventsDirectoryConfigVal;
} else {
String eventsDirectoryEnvVal = System.getenv(EVENTS_DIRECTORY_ENV);
logger.debug("Using events directory from " + EVENTS_DIRECTORY_ENV + " environment variable: " + eventsDirectoryEnvVal);
this.eventsDirectory = eventsDirectoryEnvVal;
}
}
开发者ID:larscheid-schmitzhermes,项目名称:keycloak-monitoring-prometheus,代码行数:13,代码来源:MonitoringEventListenerProviderFactory.java
示例3: init
import org.keycloak.Config; //导入依赖的package包/类
@Override
public void init(Config.Scope config) {
InputStream is = getClass().getClassLoader().getResourceAsStream("/users.properties");
if (is == null) {
logger.warn("Could not find users.properties in classpath");
} else {
try {
properties.load(is);
} catch (IOException ex) {
logger.error("Failed to load users.properties file", ex);
}
}
}
开发者ID:nmajorov,项目名称:keycloak_training,代码行数:15,代码来源:PropertyFileUserStorageProviderFactory.java
示例4: init
import org.keycloak.Config; //导入依赖的package包/类
@Override
public void init(Config.Scope config) {
}
开发者ID:Doccrazy,项目名称:keycloak-protocol-cas,代码行数:4,代码来源:AbstractCASProtocolMapper.java
示例5: init
import org.keycloak.Config; //导入依赖的package包/类
@Override
public void init(Config.Scope config) {
this.config = config;
}
开发者ID:thomasdarimont,项目名称:keycloak-health-checks,代码行数:5,代码来源:FilesystemHealthIndicatorFactory.java
示例6: FilesystemHealthIndicator
import org.keycloak.Config; //导入依赖的package包/类
FilesystemHealthIndicator(Config.Scope config) {
super("filesystem");
this.path = config.get("path", DEFAULT_PATH);
this.thresholdInBytes = config.getLong("thresholdInBytes", DEFAULT_THRESHOLD_IN_BYTES);
}
开发者ID:thomasdarimont,项目名称:keycloak-health-checks,代码行数:6,代码来源:FilesystemHealthIndicator.java
示例7: DatabaseHealthIndicator
import org.keycloak.Config; //导入依赖的package包/类
DatabaseHealthIndicator(KeycloakSession session, Config.Scope config) {
super("database");
this.session = session;
this.jndiName = config.get("jndiName", "java:jboss/datasources/KeycloakDS");
this.healthQuery = config.get("query", "SELECT 1");
}
开发者ID:thomasdarimont,项目名称:keycloak-health-checks,代码行数:7,代码来源:DatabaseHealthIndicator.java
示例8: init
import org.keycloak.Config; //导入依赖的package包/类
@Override
public void init(Config.Scope config) {
LOG.infov("Creating IdM Keycloak extension component={0}", Utils.toComponentIdString(this));
this.includedContextActions = new HashSet<>(DEFAULT_INCLUDED_CONTEXT_ACTIONS);
}
开发者ID:jugsaar,项目名称:visit-yajug-20161023-keycloak,代码行数:7,代码来源:JmsEventListenerProviderFactory.java
示例9: AmqpServer
import org.keycloak.Config; //导入依赖的package包/类
public AmqpServer(String hostname, int port, final Config.Scope config, final boolean useTls) {
this.hostname = hostname;
this.port = port;
this.config = config;
this.useTls = useTls;
}
开发者ID:EnMasseProject,项目名称:enmasse,代码行数:7,代码来源:AmqpServer.java
示例10: SaslAuthenticator
import org.keycloak.Config; //导入依赖的package包/类
SaslAuthenticator(final KeycloakSessionFactory sessionFactory, final Config.Scope config, final boolean secure) {
this.keycloakSessionFactory = sessionFactory;
this.config = config;
}
开发者ID:EnMasseProject,项目名称:enmasse,代码行数:5,代码来源:SaslAuthenticator.java
示例11: newInstance
import org.keycloak.Config; //导入依赖的package包/类
@Override
public final Instance newInstance(KeycloakSession keycloakSession, String hostname, Config.Scope config) {
return new ScramSaslAuthenticator(keycloakSession, hostname, digestName, hmacName, keyRetrievalFunctions);
}
开发者ID:EnMasseProject,项目名称:enmasse,代码行数:5,代码来源:ScramSaslServerMechanism.java
示例12: init
import org.keycloak.Config; //导入依赖的package包/类
@Override
public void init(Config.Scope config) {
themeProvider = new LiveOakLoginThemeProvider();
}
开发者ID:liveoak-io,项目名称:liveoak,代码行数:5,代码来源:LiveOakLoginThemeProviderFactory.java
示例13: init
import org.keycloak.Config; //导入依赖的package包/类
@Override
public void init(Config.Scope config) {
}
开发者ID:Doccrazy,项目名称:keycloak-protocol-cas,代码行数:5,代码来源:KeycloakCASClientInstallation.java
示例14: init
import org.keycloak.Config; //导入依赖的package包/类
public void init(Config.Scope scope) {
}
开发者ID:ohioit,项目名称:keycloak-link-idp-with-user,代码行数:4,代码来源:LinkIdpLoginAuthenticatorFactory.java
示例15: newInstance
import org.keycloak.Config; //导入依赖的package包/类
Instance newInstance(KeycloakSession session, String hostname, final Config.Scope config);
开发者ID:EnMasseProject,项目名称:enmasse,代码行数:2,代码来源:SaslServerMechanism.java
注:本文中的org.keycloak.Config类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论