To check the current auth status. This runs first after the editor starts.
command = "checkStatus"
Type:
Type.Object({
options: Type.Optional(Type.Intersect([Type.Object({
localChecksOnly: Type.Optional(Type.Boolean())
}), TestingOptions]))
})
Example:
{
"localChecksOnly": false
}
Type:
{
"status": "string" // Status status,
"user": "string" // Optional String user
}
Example:
{
"status": "OK",
"user": "your_github_user"
}
Starts sign-in process. The user needs to go to the verificationUri and enter the UserCode there.
command = "signInInitiate"
No fields
Type(for new login):
{
"status": "string", // "PromptUserDeviceFlow" or "AlreadySignedIn"
"userCode": "string",
"verificationUri": "string",
"expiresIn": "long",
"interval": "long"
}
Example(new login):
{
"status": "PromptUserDeviceFlow",
"userCode": "1AE7-3F5D",
"verificationUri": "https://github.com/login/device",
"expiresIn": 899,
"interval": 5
}
Example(user already signed in):
{
"status": "AlreadySignedIn",
"user": "your_github_user"
}
This command is waiting for the user to authenticate the application on the Github side.
command = "signInConfirm"
No fields
Type:
{
"status": "string" // Status status,
"user": "string" // String user
}
Example:
{
"status": "OK",
"user": "your_github_user"
}
command = "signOut"
Not fields
Type:
{
"status": "string" // AuthStatus status
}
Example:
{
"status": "NotSignedIn"
}
enum Status {
Ok("OK"),
MaybeOk("MaybeOK"), // if localCheckOnly = true
NotSignedIn("NotSignedIn"),
NotAuthorized("NotAuthorized"),
FailedToGetToken("FailedToGetToken"),
TokenInvalid("TokenInvalid") // not existing in agent.js
}