headscale icon indicating copy to clipboard operation
headscale copied to clipboard

Decompose OIDCCallback method

Open GrigoriyMikhalkin opened this issue 2 years ago • 2 comments

gocyclo complains about OIDCCallback method complexity. This PR decomposes this method into smaller ones to simplify it.

GrigoriyMikhalkin avatar Jul 21 '22 21:07 GrigoriyMikhalkin

Hi @GrigoriyMikhalkin. Thanks for this PR. Happy to merge it.

One small thing. Could you please return the errors from the aux functions (instead of a bool for success)? That it will be able in the future to write some (very needed) tests for OIDC.

juanfont avatar Jul 28 '22 22:07 juanfont

@juanfont Refactored aux functions to return errors.

GrigoriyMikhalkin avatar Aug 07 '22 11:08 GrigoriyMikhalkin