🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

@liflig/cdk-vy

Package Overview
Dependencies
Maintainers
4
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@liflig/cdk-vy

CDK constructs for the Vy internal services, based on nsbno/terraform-provider-vy

latest
Source
npmnpm
Version
2.4.0
Version published
Maintainers
4
Created
Source

CDK constructs for the Vy internal services

Easily use internal services from Vy in CDK infrastructure code.

This is based on https://github.com/nsbno/terraform-provider-vy

Usage

npm install @liflig/cdk-vy

Create a VyCognitoProvider

const vyCognitoProvider = new VyCognitoProvider(this, "MyProvider", {
  environment: VyEnvironment.TEST,
});

Create a resource server

const resourceServer = new CognitoResourceServer(this, "ApiResourceServer", {
  resourceServerProvider: vyCognitoProvider.resourceServerProvider,
  name: "my-api",
  identifier: "https://my-api.vydev.io",
  scopes: [
    { name: "read", description: "Read access to the API" },
    { name: "write", description: "Write access to the API" },
  ],
});

Create app clients

// Backend app client for M2M authentication
const backendClient = new CognitoAppClient(this, "BackendClient", {
  appClientProvider: vyCognitoProvider.appClientProvider,
  name: "my-backend-service",
  type: AppClientType.BACKEND,
  scopes: ["https://api.vydev.io/read", "https://api.vydev.io/write"]
});

// Access credentials
const clientId = backendClient.clientId;
const clientSecret = backendClient.clientSecret; // Stored in Secrets Manager

@example
// Frontend app client for user authentication
const frontendClient = new CognitoAppClient(this, "FrontendClient", {
  appClientProvider: vyCognitoProvider.appClientProvider,
  name: "my-web-app",
  type: AppClientType.FRONTEND,
  scopes: ["email", "openid", "profile"],
  callbackUrls: ["https://my-app.vydev.io/auth/callback"],
  logoutUrls:  ["https://my-app.vydev.io/logout"],
  authUrlPath: "/oauth2/token"
});

Keywords

aws-cdk

FAQs

Package last updated on 20 Nov 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts