Command line interface to manage API resources, clients and identity resources of your Identity Server 4 instance.
- Clone repository
- Run
scripts/install.sh
This package is available on NuGet. For installation run:
dotnet tool install --global IdentityServerCli
First of all, you need to set the environment variable named IS4_CONNECTION_STRING
of your running shell or operational system with the connection string of your Identity Server 4 instance.
Example:
export IS4_CONNECTION_STRING="Server=myServerAddress;Database=myDataBase;User Id=myUsername;
Password=myPassword;"
After that, you can run:
is4 [command]
Command to add new clients, api and identity resources.
Usage:
is4 new [command]
Create an api resource.
Usage:
is4 new api-resource [arguments] [options]
Arguments:
Name
The unique name of the resource.
Options:
-?|-h|--help
Show help information
--disabled
Indicates if this resource is disabled. Defaults to enabled.
--display-name <display-name>
Display name of the resource.
--description <description>
Description of the resource.
--user-claims <user-claims>
List of accociated user claims that should be included when this resource is requested.
--scopes <scopes>
The scopes of API
Create a client.
Usage:
is4 new client [arguments] [options]
Arguments:
ClientId
Unique ID of the client.
Options:
-?|-h|--help
Show help information
--disabled
Indicates if this client is disabled. Defaults to enabled.
--client-name <client-name>
Client display name (used for logging and consent screen).
--description <description>
Description of the client.
--client-uri <client-uri>
URI to further information about client (used on consent screen).
--logo-uri <logo-uri>
URI to client logo (used on consent screen).
--client-secrets <client-secrets>
Client secrets - only relevant for flows that require a secret.
--secret-algorithm <secret-algorithm>
The algorithm used to encode the client secrets, can be "sha256" or "sha512". Defaults to sha256.
--allowed-grant-types <allowed-grant-types>
Specifies the allowed grant types (legal combinations of AuthorizationCode, Implicit, Hybrid, ResourceOwner, ClientCredentials).
--redirect-uris <redirect-uris>
Specifies allowed URIs to return tokens or authorization codes to.
--post-logout-redirect-uris <post-logout-redirect-uris>
Specifies allowed URIs to redirect to after logout.
--allowed-scopes <allowed-scopes>
Specifies the api scopes that the client is allowed to request. If empty, the client can't access any scope.
--allowed-cors-origins <allowed-cors-origins>
The allowed CORS origins for JavaScript clients.
Create an identity resource.
Usage:
is4 new identity-resource [arguments] [options]
Arguments:
Name
The unique name of the resource.
Options:
-?|-h|--help
Show help information
--disabled
Indicates if this resource is disabled. Defaults to enabled.
--display-name <display-name>
Display name of the resource.
--description <description>
Description of the resource.
--user-claims <user-claims>
List of accociated user claims that should be included when this resource is requested.
--emphasize
Specifies whether the consent screen will emphasize this scope. Defaults to false.
--required
Specifies whether the user can de-select the scope on the consent screen. Defaults to false.
--no-show-in-discovery-document
Specifies whether this scope isn't shown in the discovery document. Defaults to false.
Command to list clients, api and identity resources.
Usage:
is4 ls [command]
List api resources.
Usage:
is4 ls api-resource
List clients.
Usage:
is4 ls client
List identity resources.
Usage:
is4 ls identity-resource
Contributions are welcome, if you find some bug please don't let of open an issue or a Pull Request.
Licensed under the MIT License. Copy of the license.