mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-03 01:41:44 +00:00
* feat(did): remove account types * feat: Refactor Property to Proof in zkprop.go * feat: add ZKP proof mechanism for verifications * fix: return bool and error from pinInitialVault * feat: implement KeyshareSet for managing user and validator keyshares * feat: Update Credential type in protobuf * feat: update credential schema with sign count * feat: migrate and modules to middleware * refactor: rename vault module to ORM * chore(dwn): add service worker registration to index template * feat: integrate service worker for offline functionality * refactor(did): use DIDNamespace enum for verification method in proto reflection * refactor: update protobuf definitions to support Keyshare * feat: expose did keeper in app keepers * Add Motr Web App * refactor: rename motr/handlers/discovery.go to motr/handlers/openid.go * refactor: move session related code to middleware * feat: add database operations for managing assets, chains, and credentials * feat: add htmx support for UI updates * refactor: extract common helper scripts * chore: remove unused storage GUI components * refactor: Move frontend rendering to dedicated handlers * refactor: rename to * refactor: move alert implementation to templ * feat: add alert component with icon, title, and message * feat: add new RequestHeaders struct to store request headers * Feature/create home view (#9) * refactor: move view logic to new htmx handler * refactor: remove unnecessary dependencies * refactor: remove unused dependencies * feat(devbox): integrate air for local development * feat: implement openid connect discovery document * refactor: rename to * refactor(did): update service handling to support DNS discovery * feat: add support for user and validator keyshares * refactor: move keyshare signing logic to signer
45 lines
1.5 KiB
Go
45 lines
1.5 KiB
Go
package svc
|
|
|
|
import (
|
|
"github.com/labstack/echo/v4"
|
|
"github.com/onsonr/sonr/internal/db/orm"
|
|
)
|
|
|
|
func GrantAuthorization(e echo.Context) error {
|
|
// Implement authorization endpoint using passkey authentication
|
|
// Store session data in cache
|
|
return nil
|
|
}
|
|
|
|
func GetJWKS(e echo.Context) error {
|
|
// Implement token endpoint
|
|
// Use cached session data for validation
|
|
return nil
|
|
}
|
|
|
|
func GetToken(e echo.Context) error {
|
|
// Implement token endpoint
|
|
// Use cached session data for validation
|
|
return nil
|
|
}
|
|
|
|
func GetDiscovery(e echo.Context) error {
|
|
baseURL := "https://" + e.Request().Host // Ensure this is the correct base URL for your service
|
|
discoveryDoc := &orm.DiscoveryDocument{
|
|
Issuer: "https://sonr.id",
|
|
AuthorizationEndpoint: "https://api.sonr.id/auth",
|
|
TokenEndpoint: "https://api.sonr.id/token",
|
|
UserinfoEndpoint: "https://api.sonr.id/userinfo",
|
|
JwksUri: baseURL + "/jwks", // You'll need to implement this endpoint
|
|
RegistrationEndpoint: baseURL + "/register",
|
|
ScopesSupported: []string{"openid", "profile", "email", "web3", "sonr"},
|
|
ResponseTypesSupported: []string{"code"},
|
|
ResponseModesSupported: []string{"query", "form_post"},
|
|
GrantTypesSupported: []string{"authorization_code", "refresh_token"},
|
|
AcrValuesSupported: []string{"passkey"},
|
|
SubjectTypesSupported: []string{"public"},
|
|
ClaimsSupported: []string{"sub", "iss", "name", "email"},
|
|
}
|
|
return e.JSON(200, discoveryDoc)
|
|
}
|