mirror of
https://github.com/pomerium/pomerium.git
synced 2025-04-29 18:36:30 +02:00
Allow users to clear the default IdP auth code options, by explicitly setting an empty idp_request_params map. To do this in a YAML config file, set: idp_request_params: {}
23 lines
563 B
Go
23 lines
563 B
Go
package google
|
|
|
|
import (
|
|
"context"
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
"github.com/stretchr/testify/require"
|
|
|
|
"github.com/pomerium/pomerium/internal/identity/oauth"
|
|
)
|
|
|
|
func TestAuthCodeOptions(t *testing.T) {
|
|
var options oauth.Options
|
|
p, err := New(context.Background(), &options)
|
|
require.NoError(t, err)
|
|
assert.Equal(t, defaultAuthCodeOptions, p.AuthCodeOptions)
|
|
|
|
options.AuthCodeOptions = map[string]string{}
|
|
p, err = New(context.Background(), &options)
|
|
require.NoError(t, err)
|
|
assert.Equal(t, map[string]string{}, p.AuthCodeOptions)
|
|
}
|