Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
92399e0
Add auth example project setup (#5)
Mar 9, 2026
b1fbc3a
Add FFI type definitions for auth module (#5)
Mar 9, 2026
9fbf6a7
Add configuration loader for auth server (#5)
Mar 9, 2026
0298b91
Add FFI library loader for libgopher-auth (#5)
Mar 9, 2026
cd5cab5
Add AuthClient and ValidationOptions classes (#5)
Mar 9, 2026
5365ef4
Add ValidationOptions unit tests (#5)
Mar 9, 2026
77fbb16
Add FFI module barrel export (#5)
Mar 9, 2026
a0ae693
Add health check endpoint (#5)
Mar 9, 2026
cb57ec0
Add OAuth discovery endpoints (#5)
Mar 9, 2026
a47483d
Add OAuth auth middleware with token extraction (#5)
Mar 9, 2026
5beaa69
Add middleware validation and response tests (#5)
Mar 9, 2026
01405bb
Add MCP JSON-RPC handler (#5)
Mar 9, 2026
dbbcb85
Add weather tools with scope-based access control (#5)
Mar 9, 2026
3d0154e
Add server entry point (#5)
Mar 9, 2026
ddbf425
Add integration tests (#5)
Mar 9, 2026
cafa4df
Add README documentation (#5)
Mar 9, 2026
24b2d6e
Add auth FFI module to SDK (#5)
Mar 9, 2026
4117e8e
Update example to use SDK auth module (#5)
Mar 9, 2026
9f26ec9
Update gopher-orch submodule to dev_auth branch (#5)
Mar 9, 2026
a67a0d7
Update build.sh to build auth example (#5)
Mar 9, 2026
08f923b
Fix CORS headers in auth example endpoints (#5)
Mar 9, 2026
d546d23
Fix FFI bindings to match C API with output parameters (#5)
Mar 9, 2026
2626c3d
Add dynamic client registration endpoint for MCP OAuth (#5)
Mar 9, 2026
35b86d0
Update server.config with test credentials (#5)
Mar 10, 2026
8bea4be
Format JS code
Mar 10, 2026
b68d84d
Fix ESLint errors in FFI auth bindings
Mar 10, 2026
a178847
Add Gopher prefix to all auth exports
Mar 11, 2026
0bf387b
Update auth example to use npm package instead of local reference
Mar 12, 2026
58893b2
Release version 0.1.2
Mar 12, 2026
92a994d
Update auth example to use @gopher.security/gopher-mcp-js ^0.1.2
Mar 12, 2026
82b38b5
Update auth example package-lock.json and add DESIGN.md
Mar 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[submodule "third_party/gopher-orch"]
path = third_party/gopher-orch
url = https://github.com/GopherSecurity/gopher-orch.git
branch = br_release
branch = dev_auth
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]


## [0.1.2] - 2026-03-12

## [0.1.1] - 2026-02-28

## [0.1.0-20260227-124047] - 2026-02-27
Expand Down Expand Up @@ -106,7 +109,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
---

[Unreleased]: https://github.com/GopherSecurity/gopher-mcp-js/compare/v0.1.0-20260227-124047...HEAD
[0.1.1]: https://github.com/GopherSecurity/gopher-mcp-js/compare/v0.1.0-20260227-124047...v0.1.1[0.1.0-20260227-124047]: https://github.com/GopherSecurity/gopher-mcp-js/compare/v0.1.0-20260226-072516...v0.1.0-20260227-124047
[0.1.2]: https://github.com/GopherSecurity/gopher-mcp-js/compare/v0.1.0-20260227-124047...v0.1.2[0.1.1]: https://github.com/GopherSecurity/gopher-mcp-js/compare/v0.1.0-20260227-124047...v0.1.1[0.1.0-20260227-124047]: https://github.com/GopherSecurity/gopher-mcp-js/compare/v0.1.0-20260226-072516...v0.1.0-20260227-124047
[0.1.0-20260226-072516]: https://github.com/GopherSecurity/gopher-mcp-js/compare/v0.1.0-20260208-150923...v0.1.0-20260226-072516
[0.1.0-20260208-150923]: https://github.com/GopherSecurity/gopher-mcp-js/compare/v0.1.0-20260206-152345...v0.1.0-20260208-150923
[0.1.0-20260206-152345]: https://github.com/GopherSecurity/gopher-mcp-js/releases/tag/v0.1.0-20260206-152345
53 changes: 50 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ if [ "$1" = "--clean" ]; then
rm -rf "${BUILD_DIR}/CMakeFiles"
rm -rf "${BUILD_DIR}/lib"
rm -rf "${BUILD_DIR}/bin"
# Clean auth example
rm -rf "${SCRIPT_DIR}/examples/auth/node_modules"
rm -rf "${SCRIPT_DIR}/examples/auth/dist"
rm -rf "${SCRIPT_DIR}/examples/auth/lib"
echo -e "${GREEN}✓ Clean complete${NC}"
if [ "$2" != "--build" ]; then
exit 0
Expand Down Expand Up @@ -142,6 +146,11 @@ cp -P "${BUILD_DIR}"/lib/libgopher-mcp-event*.so* "${NATIVE_LIB}/" 2>/dev/null |
cp -P "${BUILD_DIR}"/lib/libgopher-mcp-logging*.dylib "${NATIVE_LIB}/" 2>/dev/null || true
cp -P "${BUILD_DIR}"/lib/libgopher-mcp-logging*.so* "${NATIVE_LIB}/" 2>/dev/null || true

# Copy gopher-auth libraries
cp -P "${BUILD_DIR}"/lib/libgopher-auth*.dylib "${NATIVE_LIB}/" 2>/dev/null || true
cp -P "${BUILD_DIR}"/lib/libgopher-auth*.so* "${NATIVE_LIB}/" 2>/dev/null || true
cp -P "${BUILD_DIR}"/lib/gopher-auth*.dll "${NATIVE_LIB}/" 2>/dev/null || true

# Copy fmt and llhttp static libraries
cp -P "${BUILD_DIR}"/lib/libfmt*.a "${NATIVE_LIB}/" 2>/dev/null || true
cp -P "${BUILD_DIR}"/lib/libllhttp*.a "${NATIVE_LIB}/" 2>/dev/null || true
Expand Down Expand Up @@ -212,13 +221,51 @@ echo ""
echo -e "${YELLOW}Step 6: Running tests...${NC}"
npm test --silent 2>/dev/null && echo -e "${GREEN}✓ Tests passed${NC}" || echo -e "${YELLOW}⚠ Some tests may have failed (native library required)${NC}"

echo ""

# Step 8: Build auth example
echo -e "${YELLOW}Step 7: Building auth example...${NC}"
AUTH_EXAMPLE_DIR="${SCRIPT_DIR}/examples/auth"

if [ -d "${AUTH_EXAMPLE_DIR}" ]; then
cd "${AUTH_EXAMPLE_DIR}"

# Copy native libraries to example lib directory
echo -e "${YELLOW} Copying native libraries to example...${NC}"
mkdir -p "${AUTH_EXAMPLE_DIR}/lib"
cp -P "${NATIVE_LIB_DIR}"/libgopher-auth*.dylib "${AUTH_EXAMPLE_DIR}/lib/" 2>/dev/null || true
cp -P "${NATIVE_LIB_DIR}"/libgopher-auth*.so* "${AUTH_EXAMPLE_DIR}/lib/" 2>/dev/null || true
cp -P "${NATIVE_LIB_DIR}"/gopher-auth*.dll "${AUTH_EXAMPLE_DIR}/lib/" 2>/dev/null || true

# Install dependencies
echo -e "${YELLOW} Installing example dependencies...${NC}"
npm install --silent 2>/dev/null || npm install

# Build TypeScript
echo -e "${YELLOW} Building example TypeScript...${NC}"
npm run build --silent 2>/dev/null || npm run build

# Run tests
echo -e "${YELLOW} Running example tests...${NC}"
npm test --silent 2>/dev/null && echo -e "${GREEN}✓ Example tests passed${NC}" || echo -e "${YELLOW}⚠ Some example tests may have failed${NC}"

cd "${SCRIPT_DIR}"
echo -e "${GREEN}✓ Auth example built successfully${NC}"
else
echo -e "${YELLOW}⚠ Auth example directory not found: ${AUTH_EXAMPLE_DIR}${NC}"
fi

echo ""
echo -e "${GREEN}======================================${NC}"
echo -e "${GREEN}Build completed successfully!${NC}"
echo -e "${GREEN}======================================${NC}"
echo ""
echo -e "Native libraries: ${YELLOW}${NATIVE_LIB_DIR}${NC}"
echo -e "Native headers: ${YELLOW}${NATIVE_INCLUDE_DIR}${NC}"
echo -e "Run tests: ${YELLOW}npm test${NC}"
echo -e "Run example: ${YELLOW}npm run example${NC}"
echo -e "Build: ${YELLOW}npm run build${NC}"
echo -e "Run SDK tests: ${YELLOW}npm test${NC}"
echo -e "Run SDK example: ${YELLOW}npm run example${NC}"
echo -e "Build SDK: ${YELLOW}npm run build${NC}"
echo ""
echo -e "Auth example: ${YELLOW}${AUTH_EXAMPLE_DIR}${NC}"
echo -e "Run auth server: ${YELLOW}cd examples/auth && npm start${NC}"
echo -e "Run auth tests: ${YELLOW}cd examples/auth && npm test${NC}"
31 changes: 31 additions & 0 deletions examples/auth/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Dependencies
node_modules/

# Build output
dist/

# Native libraries
lib/*.dylib
lib/*.so
lib/*.dll

# IDE
.idea/
.vscode/
*.swp
*.swo

# OS
.DS_Store
Thumbs.db

# Test coverage
coverage/

# Environment
.env
.env.local

# Logs
*.log
npm-debug.log*
Loading
Loading