Download the PHP package nti/community-client without Composer
On this page you can find all versions of the php package nti/community-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download nti/community-client
More information about nti/community-client
Files in nti/community-client
Package community-client
Short Description Connect to community admin api easily
License MIT
Informations about the package community-client
- Introduction
- How to use
- Customization
- Supported APIs
- Users
- Root
Introduction
This is a php client to connect to Community Insided admin rest apis with no headache.
Features:
- Easy to use
- No need to get token or generate it - it's already handled by the client
- No need to specify any urls other than the base uri
- No encode/decode for json just data as you expect
How to use
1. Create new client
2. Use it
Customization
Supported credentials
It is possible to change the credential's type used to authenticate by changing the configuration of the Community Insided client.
Currently, the following credentials are supported
- password credentials, used by default
- to authenticate with a user account ``
- client credentials
- to authenticate with a client service account ``
Injecting middleware
It is possible to inject Guzzle client middleware
in the Community Insided client configuration using the middlewares
keyword.
For example:
Changing how the token is saved and stored
By default, the token is saved at runtime. This means that the previous token is not used when creating a new client.
You can customize how the token is stored in the client configuration by implementing your own TokenStorage
,
an interface which describes how the token is stored and retrieved.
Custom Community Insided endpoints
It is possible to inject Guzzle Service Operations
in the Community Insided configuration using the custom_operations
keyword. This way you can extend the built-in supported endpoints with custom.
Supported APIs
[Users]()
API | Function Name | Supported |
---|---|---|
Returns a Json User. The profile_field option in the request body provides a way to add profile fields to the registration. | ||
The key refers to an existing profile field id. | createUser | ✔️ |
Note that profile fields can be set as mandatory registration fields. | ||
Get users Returns a list of users, filtered according to query parameters | getUsers | ✔️ |
GET /{realm}/users/count | getUserCount | ✔️ |
Get representation of the user | getUser | ️️️✔️ |
Update the user | updateUser | ️️️✔️ |
Delete the user | deleteUser | ️️️✔️ |
Get consents granted by the user | ️✔️ | |
Revoke consent and offline tokens for particular client from user | ❌ | |
Disable all credentials for a user of a specific type | ❌ | |
Send a update account email to the user An email contains a link the user can click to perform a set of required actions. | executeActionsEmail | ✔️ |
Get social logins associated with the user | ✔️ | |
Add a social login provider to the user | ✔️ | |
Remove a social login provider from user | ✔️ | |
GET /{realm}/users/{id}/groups | getUserGroups | ✔️ |
GET /{realm}/users/{id}/groups/count | getUserGroupsCount | ✔️ |
PUT /{realm}/users/{id}/groups/{groupId} | addUserToGroup | ✔️ |
DELETE /{realm}/users/{id}/groups/{groupId} | deleteUserFromGroup | ✔️ |
Impersonate the user | impersonateUser | ✔️ |
Remove all user sessions associated with the user Also send notification to all clients that have an admin URL to invalidate the sessions for the particular user. | logoutUser | ✔️ |
Get offline sessions associated with the user and client | ❌ | |
Remove TOTP from the user | ❌ | |
Set up a new password for the user. | resetUserPassword | ✔️ |
Send an email-verification email to the user An email contains a link the user can click to verify their email address. | sendVerifyEmail | ✔️ |
Get sessions associated with the user | getUserSessions | ✔️ |
Get credentials associated with the user | getUserCredentials | ✔️ |
All versions of community-client with dependencies
guzzlehttp/guzzle Version ^6.0 || ^7.0
guzzlehttp/guzzle-services Version ^1.0