oauth2-proxy / mockoidc

A Mock OIDC Server for Unit & Integration Tests
MIT License
66 stars 39 forks source link

TLS configuration in README does not work #37

Open johnmaguire opened 2 years ago

johnmaguire commented 2 years ago

https://github.com/oauth2-proxy/mockoidc/blob/main/README.md?plain=1#L43-L53

This doesn't work because RunTLS calls net.Listen instead of a tls.Listen: https://github.com/oauth2-proxy/mockoidc/blob/main/mockoidc.go#L99

This example suffers from the same issue if it's trying to demonstrate TLS (which the non-nil tlsConfig led me to believe) - https://github.com/oauth2-proxy/mockoidc/blob/main/README.md?plain=1#L160-L177

Changing the last example to use tls.Listen produces a working TLS OpenID Provider.

Thanks for this project!