mirror of
https://github.com/foomo/gotsrpc.git
synced 2026-04-16 18:54:26 +00:00
This example showcases gotsrpc's special Context function for centralized authentication. The Context function handles all authentication logic, keeping service methods clean and focused on business logic. Key principle: Centralized authentication via Context function - Context function validates Authorization header once - Service methods remain clean without auth boilerplate - Single point of authentication for entire service Example includes: - AuthService: Login/logout operations - HelloService: Demonstrates Context function pattern - Complete build system with Makefile - TypeScript client with proper ES6 modules - Comprehensive tests and documentation Files: example/auth/ (complete authentication example)
30 lines
661 B
JSON
30 lines
661 B
JSON
{
|
|
"name": "@foomo/gotsrpc-examples",
|
|
"version": "0.1.0",
|
|
"lockfileVersion": 3,
|
|
"requires": true,
|
|
"packages": {
|
|
"": {
|
|
"name": "@foomo/gotsrpc-examples",
|
|
"version": "0.1.0",
|
|
"devDependencies": {
|
|
"typescript": "^5.6.3"
|
|
}
|
|
},
|
|
"node_modules/typescript": {
|
|
"version": "5.6.3",
|
|
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz",
|
|
"integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==",
|
|
"dev": true,
|
|
"license": "Apache-2.0",
|
|
"bin": {
|
|
"tsc": "bin/tsc",
|
|
"tsserver": "bin/tsserver"
|
|
},
|
|
"engines": {
|
|
"node": ">=14.17"
|
|
}
|
|
}
|
|
}
|
|
}
|