Skip to main content

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 SDK
  • adminSecret - needed for calling the SSO admin SDK
  • adminPreSharedSecret - used for signing the requests ensuring the integrity

SDK functionality

The SDK provides these methods:

  • users.create - creates an user
  • users.get - gets information about the user
  • users.delete - deletes the user
  • users.list - cursor based pagination of users
  • users.update - updates the user
  • users.setPassword - sets password for the user
  • users.metadata.get - gets user metadata
  • users.metadata.set - sets user metadata
  • users.metadata.delete - deletes user metadata
  • users.adminMigrateUsers - allow you to migrate users into SSO
  • users.adminImpersonate - allow you to impersonate user
  • users.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 SDK
  • clientPreSharedSecret - used for signing the requests ensuring the integrity

SDK functionality

The SDK provides three methods:

  • sessions.resolve - resolves session by provided cookie header
  • sessions.revoke - revokes the session by provided cookie header
  • sessions.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.