Package io.jans.scim2.client.factory
Class ScimClientFactory
- java.lang.Object
-
- io.jans.scim2.client.factory.ScimClientFactory
-
public class ScimClientFactory extends Object
A factory class to obtain "client" objects that allow interaction with the SCIM service. Usage examples can be found at https://github.com/JanssenProject/jans-scim/tree/master/README.mdCommon parameters of methods here include:
domain
: The root URL of the SCIM service. Usually in the formhttps://your.server.com/jans-scim/restv1
OIDCMetadataUrl
: URL of authorization servers' metadata document. Usually in the formhttps://your.gluu-server.com/.well-known/openid-configuration
clientId
: ID of an already registered OAuth2 clientinterfaceClass
: The Class to which the object returned will belong to. Normally it will be an interface in packageio.jans.scim2.client.rest
orio.jans.scim.ws.rs.scim2
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> T
getClient(Class<T> interfaceClass, String domain, String OIDCMetadataUrl, String clientId, String clientSecret, boolean secretPostAuthnMethod)
static <T> T
getClient(Class<T> interfaceClass, String domain, String OIDCMetadataUrl, String clientId, Path keyStorePath, String keyStorePassword, String keyId)
static ClientSideService
getClient(String domain, String OIDCMetadataUrl, String clientId, String clientSecret)
static ClientSideService
getClient(String domain, String OIDCMetadataUrl, String clientId, String clientSecret, boolean secretPostAuthnMethod)
static ClientSideService
getClient(String domain, String OIDCMetadataUrl, String clientId, Path keyStorePath, String keyStorePassword)
static ClientSideService
getClient(String domain, String OIDCMetadataUrl, String clientId, Path keyStorePath, String keyStorePassword, String keyId)
-
-
-
Method Detail
-
getClient
public static <T> T getClient(Class<T> interfaceClass, String domain, String OIDCMetadataUrl, String clientId, String clientSecret, boolean secretPostAuthnMethod) throws Exception
- Type Parameters:
T
- The type the object returned will belong to- Parameters:
interfaceClass
- See class descriptiondomain
- See class descriptionOIDCMetadataUrl
- See class descriptionclientId
- See class descriptionclientSecret
- Secret of the OAuth2 clientsecretPostAuthnMethod
- Whether the client uses client_secret_post or client_secret_basic to authenticate against the token endpoint- Returns:
- An object that allows to invoke service methods
- Throws:
Exception
- In case of initialization problem
-
getClient
public static <T> T getClient(Class<T> interfaceClass, String domain, String OIDCMetadataUrl, String clientId, Path keyStorePath, String keyStorePassword, String keyId) throws Exception
- Type Parameters:
T
- The type the object returned will belong to- Parameters:
interfaceClass
- See class descriptiondomain
- See class descriptionOIDCMetadataUrl
- See class descriptionclientId
- See class description. It is assumed the client uses private_key_jwt mechanism to authenticate against the token endpointkeyStorePath
- A path to a keystore whose keys may be employed to generate a client_assertionkeyStorePassword
- Password associated to the keystorekeyId
- Identifier of one of the keys. Its corresponding private key will be extracted to generate the assertion. If null is passed, the first key of the keystore will be used- Returns:
- An object that allows to invoke service methods
- Throws:
Exception
- In case of initialization problem
-
getClient
public static ClientSideService getClient(String domain, String OIDCMetadataUrl, String clientId, String clientSecret) throws Exception
- Parameters:
domain
- See class descriptionOIDCMetadataUrl
- See class descriptionclientId
- See class description. It is assumed the client uses client_secret_basic mechanism to authenticate against the token endpointclientSecret
- Secret of the OAuth2 client- Returns:
- An object that allows calling User, Group, and FidoDevices operations. It also has some support to call service provider configuration endpoints (see section 4 of RFC 7644)
- Throws:
Exception
- In case of initialization problem
-
getClient
public static ClientSideService getClient(String domain, String OIDCMetadataUrl, String clientId, String clientSecret, boolean secretPostAuthnMethod) throws Exception
- Parameters:
domain
- See class descriptionOIDCMetadataUrl
- See class descriptionclientId
- See class descriptionclientSecret
- Secret of the OAuth2 clientsecretPostAuthnMethod
- Whether the client uses client_secret_post or client_secret_basic to authenticate against the token endpoint- Returns:
- An object that allows calling User, Group, and FidoDevices operations. It also has some support to call service provider configuration endpoints (see section 4 of RFC 7644)
- Throws:
Exception
- In case of initialization problem
-
getClient
public static ClientSideService getClient(String domain, String OIDCMetadataUrl, String clientId, Path keyStorePath, String keyStorePassword) throws Exception
- Parameters:
domain
- See class descriptionOIDCMetadataUrl
- See class descriptionclientId
- See class description. It is assumed the client uses private_key_jwt mechanism to authenticate against the token endpointkeyStorePath
- A path to a keystore whose first key may be employed to generate a client_assertionkeyStorePassword
- Password associated to the keystore- Returns:
- An object that allows calling User, Group, and FidoDevices operations. It also has some support to call service provider configuration endpoints (see section 4 of RFC 7644)
- Throws:
Exception
- In case of initialization problem
-
getClient
public static ClientSideService getClient(String domain, String OIDCMetadataUrl, String clientId, Path keyStorePath, String keyStorePassword, String keyId) throws Exception
- Parameters:
domain
- See class descriptionOIDCMetadataUrl
- See class descriptionclientId
- See class description. It is assumed the client uses private_key_jwt mechanism to authenticate against the token endpointkeyStorePath
- A path to a keystore whose keys may be employed to generate a client_assertionkeyStorePassword
- Password associated to the keystorekeyId
- Identifier of one of the keys. Its corresponding private key will be extracted to generate the assertion. If null is passed, the first key of the keystore will be used- Returns:
- An object that allows calling User, Group, and FidoDevices operations. It also has some support to call service provider configuration endpoints (see section 4 of RFC 7644)
- Throws:
Exception
- In case of initialization problem
-
-