tulip/openid/config_test.go

20 lines
725 B
Go
Raw Normal View History

2023-09-06 22:20:09 +01:00
package openid
import (
"github.com/stretchr/testify/assert"
"testing"
)
func TestGenConfig(t *testing.T) {
assert.Equal(t, Config{
Issuer: "https://example.com",
AuthorizationEndpoint: "https://example.com/authorize",
TokenEndpoint: "https://example.com/token",
UserInfoEndpoint: "https://example.com/userinfo",
ResponseTypesSupported: []string{"code"},
ScopesSupported: []string{"openid", "email"},
ClaimsSupported: []string{"name", "email", "preferred_username"},
GrantTypesSupported: []string{"authorization_code", "refresh_token"},
2023-09-24 18:24:16 +01:00
}, GenConfig("https://example.com", []string{"openid", "email"}, []string{"name", "email", "preferred_username"}))
2023-09-06 22:20:09 +01:00
}