mirror of
https://github.com/1f349/lavender.git
synced 2024-12-22 23:54:10 +00:00
21 lines
796 B
Go
21 lines
796 B
Go
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"},
|
|
JwksUri: "https://example.com/.well-known/jwks.json",
|
|
}, GenConfig("https://example.com", []string{"openid", "email"}, []string{"name", "email", "preferred_username"}))
|
|
}
|