File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -13,8 +13,9 @@ type IdentityProvider interface {
1313// LoginOptions store the options used to customize the user experience when
1414// calling Login on an IdentityProvider.
1515type LoginOptions struct {
16- Username string
17- RedirectURL string
16+ Username string
17+ RedirectURL string
18+ SilentAuthentication bool
1819}
1920
2021// LoginOpt allows for customizing the login experience.
@@ -29,6 +30,19 @@ func WithLoginHint(username string) LoginOpt {
2930 }
3031}
3132
33+ // WithSilentAuthentication specifies to the IDP that no user interaction should
34+ // occur as part of the login.
35+ //
36+ // In the context of OIDC, this option will result in the 'prompt=none' query
37+ // parameter being sent as part of the authentication request. For more details,
38+ // please see the OIDC RFC
39+ // https://openid.net/specs/openid-connect-core-1_0-final.html#AuthRequest.
40+ func WithSilentAuthentication () LoginOpt {
41+ return func (cfg * LoginOptions ) {
42+ cfg .SilentAuthentication = true
43+ }
44+ }
45+
3246// WithRedirectURL specifies landing page for the user after authenticating to
3347// the IdentityProvider.
3448func WithRedirectURL (url string ) LoginOpt {
You can’t perform that action at this time.
0 commit comments