Skip to content

Conversation

@jackmcguire1
Copy link
Contributor

@jackmcguire1 jackmcguire1 commented Aug 31, 2021

Introduce Twitch OIDC authentication to Helix.

  • Twitch user claims struct
  • IDToken struct
  • OIDC auth struct
  • Request user OIDC access token
  • UserInfo endpoint from access token

Copy link
Owner

@nicklaw5 nicklaw5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need some documentation and some mock tests if it's not too much trouble.

go.mod Outdated
Comment on lines 6 to 9
github.com/coreos/go-oidc v2.2.1+incompatible // indirect
github.com/coreos/go-oidc/v3 v3.0.0 // indirect
github.com/pquerna/cachecontrol v0.1.0 // indirect
golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f // indirect
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't look right. Can you please run a go mod tidy to fix this.

return
}

func (c *Client) UserInfoFromAccessToken(
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
func (c *Client) UserInfoFromAccessToken(
func (c *Client) UserInfoFromOIDCAccessToken(

@coveralls
Copy link

coveralls commented Sep 1, 2021

Pull Request Test Coverage Report for Build 1186133813

  • 0 of 67 (0.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-5.5%) to 91.096%

Changes Missing Coverage Covered Lines Changed/Added Lines %
authentication.go 0 67 0.0%
Totals Coverage Status
Change from base Build 1179954764: -5.5%
Covered Lines: 1064
Relevant Lines: 1168

💛 - Coveralls

- update module name
- JWT signing
- extension configuration segments endpoints
- extension secrets endpoints
- UPDATE extension docs
The Twitch docs are not really clear on some parts of the requests

getExtensionConfiguration:
 - broadcasterID is an optional query parameter

setExtensionConfiguration:
- broadcasterId is an optional body parameter
- validate the segment type if broadcasterID is provided

MISC:
- update 'GetExtensionSecret' -> 'GetExtensionSecrets'
The response contains a json field 'total' which we're
not currently unmarshalling to create event subs
- Extension Live Channels
- Unit test for Extension Live Channels
- Supported Endpoints
https://dev.twitch.tv/docs/api/reference#send-chat-announcement

- add api parameters, response, func to chat.go
- add unit tests
https://dev.twitch.tv/docs/api/reference#send-chat-announcement

- add api parameters, response, func to chat.go
- add unit tests
- add prefix of '/' to the charity campaigns url
- Twitch user claims struct
- IDToken struct
- OIDC auth struct
- Request user OIDC access token
- UserInfo endpoint from access token
- oidc provider as interface
- refactor auth url to default url
- fetch auth url and oidc provider from opts of client
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants