Merge pull request #96 from jenmalloy/RHSSO-920-3
fixed remaining issues for RHSSO-920
This commit is contained in:
commit
938e254c60
4 changed files with 7 additions and 10 deletions
|
@ -1,14 +1,14 @@
|
||||||
|
|
||||||
=== Packaging and Deployment
|
=== Packaging and Deployment
|
||||||
|
|
||||||
User Storage providers are packaged in a jar and deployed or undeployed to the {{book.project.name}} runtime in the same way you would deploy something in the JBoss/Wildfly application server. You can either copy the jar directly to the `deploy/` directory of the server, or use the JBoss CLI to execute the deployment.
|
User Storage providers are packaged in a JAR and deployed or undeployed to the {{book.project.name}} runtime in the same way you would deploy something in the JBoss/Wildfly application server. You can either copy the JAR directly to the `deploy/` directory of the server, or use the JBoss CLI to execute the deployment.
|
||||||
|
|
||||||
In order for {{book.project.name}} to recognize the provider, you need to add a file to the jar: `META-INF/services/org.keycloak.storage.UserStorageProviderFactory`. This file must contain a line-separated list of fully qualified classnames of the `UserStorageProviderFactory` implementation:
|
In order for {{book.project.name}} to recognize the provider, you need to add a file to the JAR: `META-INF/services/org.keycloak.storage.UserStorageProviderFactory`. This file must contain a line-separated list of fully qualified classnames of the `UserStorageProviderFactory` implementations:
|
||||||
|
|
||||||
----
|
----
|
||||||
org.keycloak.examples.federation.properties.ClasspathPropertiesStorageFactory
|
org.keycloak.examples.federation.properties.ClasspathPropertiesStorageFactory
|
||||||
org.keycloak.examples.federation.properties.FilePropertiesStorageFactory
|
org.keycloak.examples.federation.properties.FilePropertiesStorageFactory
|
||||||
----
|
----
|
||||||
|
|
||||||
{{book.project.name}} supports hot deployment of these provider jars. You'll also see later in this chapter that you can package it within and as Java EE components.
|
{{book.project.name}} supports hot deployment of these provider JARs. You'll also see later in this chapter that you can package it within and as Java EE components.
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
=== Provider Capability Interfaces
|
=== Provider Capability Interfaces
|
||||||
|
|
||||||
If you've examined the `UserStorageProvider` interface closely you might notice that it does not define any methods for locating or managing users. These methods are actually defined in other _capability__interfaces_ depending on what scope of capabilities your external user store can provide and execute on. For example, some external stores are read-only and can only do simple queries and credential validation. You will only be required to implement the _capability_ _interfaces_ for the features you are able to. Here's a list of interfaces that you can implement:
|
If you have examined the `UserStorageProvider` interface closely you might notice that it does not define any methods for locating or managing users. These methods are actually defined in other _capability interfaces_ depending on what scope of capabilities your external user store can provide and execute on. For example, some external stores are read-only and can only do simple queries and credential validation. You will only be required to implement the _capability interfaces_ for the features you are able to. You can implement these interfaces:
|
||||||
|
|
||||||
|
|
||||||
|===
|
|===
|
||||||
|
|
|
@ -51,12 +51,9 @@ public interface UserStorageProvider extends Provider {
|
||||||
}
|
}
|
||||||
----
|
----
|
||||||
|
|
||||||
You may be thinking that the `UserStorageProvider` interface is pretty sparse? You'll see later in this chapter that
|
You may be thinking that the `UserStorageProvider` interface is pretty sparse? You'll see later in this chapter that there are other mix-in interfaces your provider class may implement to support the meat of user integration.
|
||||||
there are other mix-in interfaces your provider class may implement to support the meat of user integration.
|
|
||||||
|
|
||||||
`UserStorageProvider` instances are created once per transaction. When the transaction is complete, the
|
`UserStorageProvider` instances are created once per transaction. When the transaction is complete, the `UserStorageProvider.close()` method is invoked and the instance is then garbage collected. Instances are created by provider factories. Provider factories implement the `org.keycloak.storage.UserStorageProviderFactory` interface.
|
||||||
`UserStorageProvider.close()` method is invoked and the instance is then garbage collected. Instances are created
|
|
||||||
by provider factories. Provider factories implement the `org.keycloak.storage.UserStorageProviderFactory` interface.
|
|
||||||
|
|
||||||
[source,java]
|
[source,java]
|
||||||
----
|
----
|
||||||
|
|
|
@ -90,7 +90,7 @@ Every get method of `AbstractUserAdapter` either returns null or empty collectio
|
||||||
|
|
||||||
The `getUserById()` method parses the `id` parameter using the `org.keycloak.storage.StorageId' helper class. The `StorageId.getExternalId()` method is invoked to obtain the username embeded in the `id` parameter. The method then delegates to `getUserByUsername()`.
|
The `getUserById()` method parses the `id` parameter using the `org.keycloak.storage.StorageId' helper class. The `StorageId.getExternalId()` method is invoked to obtain the username embeded in the `id` parameter. The method then delegates to `getUserByUsername()`.
|
||||||
|
|
||||||
Emails are not stored, so the `getUserByEmail() method returns null.
|
Emails are not stored, so the `getUserByEmail()` method returns null.
|
||||||
|
|
||||||
===== CredentialInputValidator Implementation
|
===== CredentialInputValidator Implementation
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue