Server setup
We provide two APIs - one for managing the users (admin) and one for resolving the sessions (client).
Admin SDK
Through Admin SDK you can manage the users (create, delete, get, list, update), manage the metadata persisted on users, migrate the users to the Citadel SSO and use impersonalization functionality.
Prerequisites
adminApiUri- URI to set up with the SSO admin SDKadminSecret- needed for calling the SSO admin SDKadminPreSharedSecret- used for signing the requests ensuring the integrity
SDK functionality
The SDK provides these methods:
users.create- creates an userusers.get- gets information about the userusers.delete- deletes the userusers.list- cursor based pagination of usersusers.update- updates the userusers.setPassword- sets password for the userusers.metadata.get- gets user metadatausers.metadata.set- sets user metadatausers.metadata.delete- deletes user metadatausers.adminMigrateUsers- allow you to migrate users into SSOusers.adminImpersonate- allow you to impersonate userusers.adminStopImpersonating- allow you to stop user impersonalization
Go SDK
SDK can be found at Github.com.
Here is an example on how to create the client instance:
package main
import (
citadel "github.com/everlutionsk/go/qzila/sdk/citadel_admin"
)
func main() {
// Create a new SDK client
client := citadel.NewClient(&citadel.ClientConfig{
BaseUrl: "{adminApiUri}",
ApiKey: "{adminSecret}",
PreSharedKey: "{adminPreSharedKey}",
})
}
Client SDK
The Client SDK is used for resolving the session and ensuring that the API request is fully authorized.
Prerequisites
clientApiUri- URI to set up with the SSO client SDKclientPreSharedSecret- used for signing the requests ensuring the integrity
SDK functionality
The SDK provides three methods:
sessions.resolve- resolves session by provided cookie headersessions.revoke- revokes the session by provided cookie headersessions.resolveBearer- resolves session by provided bearer token
Go SDK
SDK can be found at Github.com.
Here is an example on how to create the client instance:
package main
import (
citadel "github.com/everlutionsk/go/qzila/sdk/citadel_client"
)
func main() {
// Create a new SDK client
client := citadel.NewClient(&citadel.ClientConfig{
BaseUrl: "{clientApiUri}",
PreSharedKey: "{clientPreSharedSecret}",
})
}
PHP SDK
SDK can be found at Github.com.
An usage example can be seen in readme file.