dt-app
Version:
The Dynatrace App Toolkit is a tool you can use from your command line to create, develop, and deploy apps on your Dynatrace environment.
64 lines (63 loc) • 2.28 kB
TypeScript
export type OAuth2TokenType = 'Bearer';
export type OAuth2GrantType = 'authorization_code' | 'refresh_token';
export interface OAuth2AuthorizedCode {
code: string;
state: string;
}
export interface AutomationTokenResponse {
/** The access token issued by the authorization server */
access_token: string;
/** The lifetime in seconds of the access token. */
expires_in: number;
/** The list of scopes */
scope: string;
/** The type of the token, value is case insensitive */
token_type: OAuth2TokenType;
}
/** The response that is retrieved by the dev */
export interface OAuth2TokenResponse {
/** The list of scopes */
scope: string;
/** The type of the token, value is case insensitive */
token_type: OAuth2TokenType;
/** The lifetime in seconds of the access token. */
expires_in: number;
/** The access token issued by the authorization server */
access_token: string;
/** The refresh token, which can be used to obtain new access tokens */
refresh_token: string;
/** JWT id_token */
id_token: string;
}
type DtAppLocalTokenInformation = {
environment_url: string;
oauth_url: string;
oauth_client_id: string;
};
export declare const enum AuthWorkflow {
AUTOMATION = "automation",
SSO = "sso"
}
export type SSOTokenInformation = OAuth2TokenResponse & DtAppLocalTokenInformation & {
authentication_flow: AuthWorkflow.SSO;
};
export type AutomationTokenInformation = AutomationTokenResponse & DtAppLocalTokenInformation & {
authentication_flow: AuthWorkflow.AUTOMATION;
};
export interface OAuth2TokenInfoResponse {
/** This is a boolean value of whether or not the presented token is currently active. */
active: boolean;
/** Space-separated list of scopes associated with this token */
scope: string[];
/** The client identifier for the OAuth 2.0 client that the token was issued to. */
client_id: string;
/** The type of the token, value is case insensitive */
token_type: OAuth2TokenType;
/** The lifetime in seconds of the access token. */
expires_in: number;
realm: string;
/** The access token issued by the authorization server */
access_token: string;
grant_type: OAuth2GrantType;
}
export {};