@@ -2,6 +2,7 @@ package providers
22
33import (
44 "context"
5+ "net/url"
56 "testing"
67 "time"
78
@@ -19,3 +20,30 @@ func TestRefresh(t *testing.T) {
1920 assert.Equal(t, false, refreshed)
2021 assert.Equal(t, nil, err)
2122}
23+
24+func TestAcrValuesNotConfigured(t *testing.T) {
25+ p := &ProviderData{
26+ LoginURL: &url.URL{
27+ Scheme: "http",
28+ Host: "my.test.idp",
29+ Path: "/oauth/authorize",
30+ },
31+ }
32+
33+ result := p.GetLoginURL("https://my.test.app/oauth", "")
34+ assert.NotContains(t, result, "acr_values")
35+}
36+
37+func TestAcrValuesConfigured(t *testing.T) {
38+ p := &ProviderData{
39+ LoginURL: &url.URL{
40+ Scheme: "http",
41+ Host: "my.test.idp",
42+ Path: "/oauth/authorize",
43+ },
44+ AcrValues: "testValue",
45+ }
46+
47+ result := p.GetLoginURL("https://my.test.app/oauth", "")
48+ assert.Contains(t, result, "acr_values=testValue")
49+}