Skip to content

Commit

Permalink
app update
Browse files Browse the repository at this point in the history
  • Loading branch information
avsol committed Mar 15, 2019
1 parent 50fb6b6 commit 3713290
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 7 deletions.
32 changes: 31 additions & 1 deletion SupercondActorTypes.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,26 @@
url: string;
query: IKeyValuePair[];
bodyJson: string;
authClaims: IAuthClaim[];
}

interface IAuthClaim {
type: string;
subject: IAuthClaimsIdentity;
originalIssuer: string;
issuer: string;
valueType: string;
value: string;
properties: IKeyValuePair[];
}

interface IAuthClaimsIdentity {
authenticationType: string;
isAuthenticated: boolean;
label: string;
name: string;
nameClaimType: string;
roleClaimType: string;
}

interface IKeyValuePair {
Expand Down Expand Up @@ -238,14 +258,24 @@
instanceCount: number;
metadataJson?: string;
serviceScript?: string;
enableADAuthentication: boolean;
apiAuthenticationType: number;
apiAuthenticationConfig?: IApiAuthConfig;
configureProxy: boolean;
proxyConfiguration?: IKeyValuePair[];
serveFiles: boolean;
filesConfig?: IApiServiceFiles;
stopRequested?: boolean;
}

interface IApiAuthConfig {
authority: string;
validIssuers: string[];
validAudiences: string[];
disableIssuerValidation: boolean;
disableAudienceValidation: boolean;
disableLifetimeValidation: boolean;
}

interface IApiServiceFiles {
defaultFile: string;
apiUrlPrefix: string;
Expand Down
16 changes: 14 additions & 2 deletions spec/support/SupercondActorMock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export class _SupercondActor_RequestMock implements SupercondActor.IApiRequest {
url = '';
query = [];
bodyJson = '{}';
authClaims = [];
}

export class _SupercondActor_ResponseMock implements SupercondActor.IApiResponse {
Expand Down Expand Up @@ -53,7 +54,10 @@ class SupercondActorPlatformConfigMock implements SupercondActor.IPlatformConfig
}
getApiAuthConfigurationAsync(): Promise<SupercondActor.IApiAuthConfiguration> {
return new Promise((resolve, reject) => {
resolve(null);
resolve({
clientID: 'clientID-12345',
tenantID: 'tenantID-12345'
});
});
}
}
Expand Down Expand Up @@ -187,7 +191,15 @@ class SupercondActorApiServiceConfigMock implements SupercondActor.IApiServiceCo
serviceScript = '';
metadataJson = '{}';
removalRequested = false;
enableADAuthentication = false;
apiAuthenticationType = 0;
apiAuthenticationConfig = {
"authority": "",
"validIssuers": [],
"validAudiences": [],
"disableIssuerValidation": false,
"disableAudienceValidation": false,
"disableLifetimeValidation": false
};
configureProxy = true;
serveFiles = false;
filesConfig = null;
Expand Down
4 changes: 2 additions & 2 deletions src/app/test-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export class TestManager {
groupName: 'Generated Services',
instanceCount: -1,
metadataJson: '{ "description": "Generated by TestManager scheduled service" }',
enableADAuthentication: false,
apiAuthenticationType: 0,
configureProxy: true,
serveFiles: false,
proxyConfiguration: [
Expand All @@ -109,7 +109,7 @@ return results;`,
groupName: 'Generated Services',
instanceCount: -1,
metadataJson: '{ "description": "Generated by TestManager scheduled service" }',
enableADAuthentication: false,
apiAuthenticationType: 0,
configureProxy: true,
serveFiles: false,
proxyConfiguration: [
Expand Down
5 changes: 3 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import { TestManager } from "./app/test-manager";
// in your service's job script at runtime.

(global as any).MyServiceTypes = {
// It's OK to delare global types here,
// BUT DON'T CREATE GLOBAL INSTANCES OR VARIABLES - THAT LEADS TO MULTITHREADING PROBLEMS!!!
// It's OK to delare global types or immutable variables here,
// BUT DON'T CREATE GLOBAL INSTANCES OR VARIABLES THAT CAN CHANGE -
// IT WILL LEAD TO MULTITHREADING PROBLEMS!!!
TestManager: TestManager
};

0 comments on commit 3713290

Please sign in to comment.