mirror of
https://github.com/onsonr/sonr.git
synced 2025-03-10 21:09:11 +00:00
* fix: update commitizen version * feat: add WASM build tags to db actions * feat: Update all actions to follow `AddAsset` for error handling * feat: remove database dependency in dwn and motr commands * feat: add basic info form to registration view * feat: implement basic browser navigation component * refactor: move database related files to middleware * fix: remove unused test command * fix: update source directory for buf-publish workflow
28 lines
1.0 KiB
Go
28 lines
1.0 KiB
Go
package builder
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/onsonr/sonr/internal/dwn/models"
|
|
)
|
|
|
|
func GetDiscovery(origin string) *models.DiscoveryDocument {
|
|
baseURL := "https://" + origin // Ensure this is the correct base URL for your service
|
|
discoveryDoc := &models.DiscoveryDocument{
|
|
Issuer: baseURL,
|
|
AuthorizationEndpoint: fmt.Sprintf("%s/auth", baseURL),
|
|
TokenEndpoint: fmt.Sprintf("%s/token", baseURL),
|
|
UserinfoEndpoint: fmt.Sprintf("%s/userinfo", baseURL),
|
|
JwksUri: fmt.Sprintf("%s/jwks", baseURL),
|
|
RegistrationEndpoint: fmt.Sprintf("%s/register", baseURL),
|
|
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 discoveryDoc
|
|
}
|