Skip to content

Commit

Permalink
changes to merge
Browse files Browse the repository at this point in the history
Signed-off-by: Duarte Nunes <duarte@uma.ni>
  • Loading branch information
duarten committed Feb 19, 2020
1 parent 0d274d4 commit ab0b3da
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions packages/@aws-cdk/aws-appsync/lib/graphqlapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,25 +69,28 @@ function isApiKeyConfig(obj: unknown): obj is ApiKeyConfig {
return (obj as ApiKeyConfig).apiKeyDesc !== undefined;
}

type AuthModes = UserPoolConfig | ApiKeyConfig;

/**
* Marker interface for the different authorization modes.
*/
type AuthMode = UserPoolConfig | ApiKeyConfig;

/**
* Configuration of the API authorization modes.
*/
export interface AuthorizationConfig {
/**
* Optional authorization configuration
*
* @default - API Key authorization
*/
readonly defaultAuthorization?: AuthModes;
readonly defaultAuthorization?: AuthMode;

/**
* Additional authorization modes
*
* @default - No other modes
*/
readonly additionalAuthorizationModes?: [AuthModes]
readonly additionalAuthorizationModes?: [AuthMode]
}

/**
Expand Down

0 comments on commit ab0b3da

Please sign in to comment.