This commit is contained in:
4
.github/workflows/publish.yml
vendored
4
.github/workflows/publish.yml
vendored
@@ -31,8 +31,8 @@ jobs:
|
||||
- name: Build
|
||||
run: npm run build
|
||||
|
||||
- name: Generate TS Protobuf
|
||||
run: npm run generate
|
||||
- name: Generate Protobuf
|
||||
run: protoc -I ./proto ./proto/*.proto \ --ts_proto_out=./gen --ts_proto_opt=nestJs=true,package=omit \ --go_out=./gen --go_opt=paths=source_relative \ --go-grpc_out=./gen --go-grpc_opt=paths=source_relative
|
||||
|
||||
- name: Publish package
|
||||
run: npm publish
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
{
|
||||
"name": "@lendry-erp/contracts",
|
||||
"version": "1.0.8",
|
||||
"version": "1.0.9",
|
||||
"description": "Protobuf definitions and generated TypeScript types",
|
||||
"type": "commonjs",
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
"scripts": {
|
||||
"build": "tsc -p tsconfig.build.json",
|
||||
"generate": "protoc -I ./proto ./proto/*.proto --ts_proto_out=./gen --ts_proto_opt=nestJs=true,package=omit"
|
||||
"build": "tsc -p tsconfig.build.json"
|
||||
},
|
||||
"files": [
|
||||
"dist",
|
||||
|
||||
27
proto/ldap.proto
Normal file
27
proto/ldap.proto
Normal file
@@ -0,0 +1,27 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package ldap_service;
|
||||
import "google/rpc/status.proto";
|
||||
|
||||
service LdapAuth {
|
||||
rpc VerifyUser (VerifyRequest) returns (VerifyResponse);
|
||||
}
|
||||
|
||||
message VerifyRequest {
|
||||
string username = 1;
|
||||
string password = 2;
|
||||
}
|
||||
|
||||
message VerifyResponse {
|
||||
bool success = 1;
|
||||
string error_message = 2;
|
||||
UserData user = 3;
|
||||
}
|
||||
|
||||
message UserData {
|
||||
string dn = 1;
|
||||
string display_name = 2;
|
||||
repeated string groups = 3;
|
||||
bool is_active = 4;
|
||||
}
|
||||
|
||||
@@ -2,4 +2,5 @@ import { join } from "path";
|
||||
|
||||
export const PROTO_PATHS = {
|
||||
AUTH: join(__dirname, "../../proto/identity.proto"),
|
||||
LDAP: join(__dirname, "../../proto/ldap.proto"),
|
||||
} as const;
|
||||
|
||||
Reference in New Issue
Block a user