oauth2_proxy/providers
Carlo Lobrano 731fa9f8e0 Github provider: use login as user
- Save both user and email in session state:
    Encoding/decoding methods save both email and user
    field in session state, for use cases when User is not derived from
    email's local-parth, like for GitHub provider.

    For retrocompatibility, if no user is obtained by the provider,
    (e.g. User is an empty string) the encoding/decoding methods fall back
    to the previous behavior and use the email's local-part

    Updated also related tests and added two more tests to show behavior
    when session contains a non-empty user value.

- Added first basic GitHub provider tests

- Added GetUserName method to Provider interface
    The new GetUserName method is intended to return the User
    value when this is not the email's local-part.

    Added also the default implementation to provider_default.go

- Added call to GetUserName in redeemCode

    the new GetUserName method is used in redeemCode
    to get SessionState User value.

    For backward compatibility, if GetUserName error is
    "not implemented", the error is ignored.

- Added GetUserName method and tests to github provider.
2017-11-20 20:02:27 +01:00
..
azure_test.go Swap out bmizerany/assert package that is deprecated in favor of stretchr/testify/assert 2017-10-23 12:24:17 -04:00
azure.go gofmt 2017-03-29 09:36:38 -04:00
facebook.go Facebook Authentication Provider 2016-06-23 08:43:21 -04:00
github_test.go Github provider: use login as user 2017-11-20 20:02:27 +01:00
github.go Github provider: use login as user 2017-11-20 20:02:27 +01:00
gitlab_test.go providers: update gitlab api endpoint to use latest version, v4 2017-11-06 12:05:58 -05:00
gitlab.go providers: update gitlab api endpoint to use latest version, v4 2017-11-06 12:05:58 -05:00
google_test.go Swap out bmizerany/assert package that is deprecated in favor of stretchr/testify/assert 2017-10-23 12:24:17 -04:00
google.go use base64.RawURLEncoding.DecodeString() in place of a bespoke function 2017-07-13 18:29:58 +00:00
internal_util_test.go Swap out bmizerany/assert package that is deprecated in favor of stretchr/testify/assert 2017-10-23 12:24:17 -04:00
internal_util.go Drop deprecated MyUSA provider. 2017-10-08 01:01:15 -04:00
linkedin_test.go Swap out bmizerany/assert package that is deprecated in favor of stretchr/testify/assert 2017-10-23 12:24:17 -04:00
linkedin.go *: rename Url to URL everywhere 2015-11-09 00:47:44 +01:00
oidc.go Add OpenID Connect provider name. 2017-10-08 00:40:36 -04:00
provider_data.go Add Azure Provider 2016-01-20 03:57:17 -05:00
provider_default_test.go Swap out bmizerany/assert package that is deprecated in favor of stretchr/testify/assert 2017-10-23 12:24:17 -04:00
provider_default.go Github provider: use login as user 2017-11-20 20:02:27 +01:00
providers.go Github provider: use login as user 2017-11-20 20:02:27 +01:00
session_state_test.go Github provider: use login as user 2017-11-20 20:02:27 +01:00
session_state.go Github provider: use login as user 2017-11-20 20:02:27 +01:00