Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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: 2 additions & 0 deletions authlib_injector.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ type authlibInjectorMeta struct {
Links authlibInjectorLinks `json:"links"`
ServerName string `json:"serverName"`
FeatureEnableProfileKey bool `json:"feature.enable_profile_key"`
FeatureNonEmailLogin bool `json:"feature.non_email_login"`
}

type authlibInjectorResponse struct {
Expand Down Expand Up @@ -76,6 +77,7 @@ func AuthlibInjectorRoot(app *App) func(c echo.Context) error {
},
ServerName: app.Config.InstanceName,
FeatureEnableProfileKey: true,
FeatureNonEmailLogin: true,
},
SignaturePublickey: signaturePublicKey,
SignaturePublickeys: signaturePublicKeys,
Expand Down
2 changes: 2 additions & 0 deletions authlib_injector_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ func (ts *TestSuite) testAuthlibInjectorRoot(t *testing.T) {
assert.Equal(t, ts.App.FrontEndURL, response.Meta.Links.Homepage)
assert.Equal(t, Unwrap(url.JoinPath(ts.App.FrontEndURL, "web/registration")), response.Meta.Links.Register)
assert.Equal(t, []string{ts.App.Config.Domain}, response.SkinDomains)
assert.True(t, response.Meta.FeatureNonEmailLogin)
}

func (ts *TestSuite) testAuthlibInjectorRootFallback(t *testing.T) {
Expand All @@ -71,6 +72,7 @@ func (ts *TestSuite) testAuthlibInjectorRootFallback(t *testing.T) {
assert.Nil(t, json.NewDecoder(rec.Body).Decode(&response))

assert.Equal(t, []string{ts.App.Config.Domain, FALLBACK_SKIN_DOMAIN_A, FALLBACK_SKIN_DOMAIN_B}, response.SkinDomains)
assert.True(t, response.Meta.FeatureNonEmailLogin)
}

func (ts *TestSuite) testAuthlibInjectorTextureUploadDelete(t *testing.T) {
Expand Down