Get server public information
The endpoint can get the server's public information, such as RSA256 public key, SM2 public key, GenAuth service version number, etc.
Method name
AuthenticationClient.getSystemInfo
Request parameters
| Name | Type | Required | Default value | Description | Sample value |
|---|
Sample code
ts
import { AuthenticationClient, Models } from "authing-node-sdk";
const authenticationClient = new AuthenticationClient({
// Need to replace with your GenAuth AppId, Secret and Host
appId: "GEN_AUTH_APP_ID",
appSecret: "GEN_AUTH_APP_SECRET",
appHost: "GEN_AUTH_APP_HOST",
});
(async () => {
const result = await authenticationClient.getSystemInfo();
console.log(JSON.stringify(result, null, 2));
})();Request response
Type: SystemInfoResp
| Name | Type | Description |
|---|---|---|
| rsa | <a SystmeInfoRSAConfig | RSA256 encryption configuration information |
| sm2 | <a SystmeInfoSM2Config | National SM2 encryption configuration information |
| version | <a SystmeInfoVersion | National SM2 encryption configuration information |
| publicIps | array | GenAuth service external IP list |
Sample result:
json
{
"rsa": {
"publicKey": "xxxxxxxxxxxxxxxxxxxxxx"
},
"sm2": {
"publicKey": "xxxxxxxxxxxxxxxxxxxxxx"
},
"version": {
"server": "2.0.0",
"console": "2.0.0",
"login": "2.0.0"
}
}Data structure
SystmeInfoRSAConfig
| Name | Type | Is it required | Description | Sample value |
|---|---|---|---|---|
| publicKey | string | Yes | RSA256 public key | xxxxxxxxxxxxxxxxxxxxxx |
SystmeInfoSM2Config
| Name | Type | Is it required? | Description | Sample value |
|---|---|---|---|---|
| publicKey | string | Yes | SM2 public key | xxxxxxxxxxxxxxxxxxxxxx |
SystmeInfoVersion
| Name | Type | Is it required? | Description | Sample value |
|---|---|---|---|---|
| server | string | yes | GenAuth core service version number | 2.0.0 |
| console | string | yes | GenAuth console version number | 2.0.0 |
| login | string | yes | GenAuth hosted login page version number | 2.0.0 |