diff --git a/gin/jose_example_test.go b/gin/jose_example_test.go index a1001aa..a5054f7 100644 --- a/gin/jose_example_test.go +++ b/gin/jose_example_test.go @@ -35,7 +35,7 @@ func Example_RS256() { // output: // token request // 201 - // {"access_token":"eyJhbGciOiJSUzI1NiIsImtpZCI6IjIwMTEtMDQtMjkifQ.eyJhdWQiOiJodHRwOi8vYXBpLmV4YW1wbGUuY29tIiwiZXhwIjoxNzM1Njg5NjAwLCJpc3MiOiJodHRwOi8vZXhhbXBsZS5jb20iLCJqdGkiOiJtbmIyM3Zjc3J0NzU2eXVpb21uYnZjeDk4ZXJ0eXVpb3AiLCJyb2xlcyI6WyJyb2xlX2EiLCJyb2xlX2IiXSwic3ViIjoiMTIzNDU2Nzg5MHF3ZXJ0eXVpbyJ9.NrLwxZK8UhS6CV2ijdJLUfAinpjBn5_uliZCdzQ7v-Dc8lcv1AQA9cYsG63RseKWH9u6-TqPKMZQ56WfhqL028BLDdQCiaeuBoLzYU1tQLakA1V0YmouuEVixWLzueVaQhyGx-iKuiuFhzHWZSqFqSehiyzI9fb5O6Gcc2L6rMEoxQMaJomVS93h-t013MNq3ADLWTXRaO-negydqax_WmzlVWp_RDroR0s5J2L2klgmBXVwh6SYy5vg7RrnuN3S8g4oSicJIi9NgnG-dDikuaOg2DeFUt-mYq_j_PbNXf9TUl5hl4kEy7E0JauJ17d1BUuTl3ChY4BOmhQYRN0dYg","exp":1735689600,"refresh_token":"eyJhbGciOiJSUzI1NiIsImtpZCI6IjIwMTEtMDQtMjkifQ.eyJhdWQiOiJodHRwOi8vYXBpLmV4YW1wbGUuY29tIiwiZXhwIjoxNzM1Njg5NjAwLCJpc3MiOiJodHRwOi8vZXhhbXBsZS5jb20iLCJqdGkiOiJtbmIyM3Zjc3J0NzU2eXVpb21uMTI4NzZidmN4OThlcnR5dWlvcCIsInN1YiI6IjEyMzQ1Njc4OTBxd2VydHl1aW8ifQ.v5dzeXlcYGOCwlhJ05tQ7JXgNw_KO49YvAtURxUOlWqF-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UuY29tIiwiZXhwIjoxNzM1Njg5NjAwLCJpc3MiOiJodHRwOi8vZXhhbXBsZS5jb20iLCJqdGkiOiJtbmIyM3Zjc3J0NzU2eXVpb21uMTI4NzZidmN4OThlcnR5dWlvcCIsInN1YiI6IjEyMzQ1Njc4OTBxd2VydHl1aW8ifQ.d-2M5oC2H29qZQdEd5LE221fQZwl2L1ibMF_EeG5uOyBVlay705_aU6XRnZ4Y7Ns77C7RPz215is7aDOVydrq48cBbztoezxUvc2r5aT84quvT_QImyiDpWYrErthr9a_UpAEthIwh8AfcizW0fXrhEYifaZp2hxG24x5bQqWssFZo4UCzMzfp90NJuIQ970bl_Q0mJbOv4ao8X14MMb6j4MuqRGKPAt8rQDpcfSkbxgKofC4GrrcaaCa7Y-wrrMjurRJiYKe_y2OKSyKx5T8PsbXxrWzmRhL1nBF3Kq1wHFcz3M0yemyN2q9Af9BY-kyh5cnv_OgcSlb5RmW0O2Xg"} // map[Content-Type:[application/json; charset=utf-8]] // unauthorized request // 401 @@ -49,7 +49,7 @@ func Example_RS256() { // application/json; charset=utf-8 // refresh token request // 201 - // {"access_token":"eyJhbGciOiJSUzI1NiIsImtpZCI6IjIwMTEtMDQtMjkifQ.eyJhdWQiOiJodHRwOi8vYXBpLmV4YW1wbGUuY29tIiwiZXhwIjoxNzM1Njg5NjAwLCJpc3MiOiJodHRwOi8vZXhhbXBsZS5jb20iLCJqdGkiOiJtbmIyM3Zjc3J0NzU2eXVpb21uYnZjeDk4ZXJ0eXVpb3AiLCJyb2xlcyI6WyJyb2xlX2EiLCJyb2xlX2IiXSwic3ViIjoiMTIzNDU2Nzg5MHF3ZXJ0eXVpbyJ9.NrLwxZK8UhS6CV2ijdJLUfAinpjBn5_uliZCdzQ7v-Dc8lcv1AQA9cYsG63RseKWH9u6-TqPKMZQ56WfhqL028BLDdQCiaeuBoLzYU1tQLakA1V0YmouuEVixWLzueVaQhyGx-iKuiuFhzHWZSqFqSehiyzI9fb5O6Gcc2L6rMEoxQMaJ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U2Nzg5MHF3ZXJ0eXVpbyJ9.SFy8lloEcTMGb7twtxOPMZE1zPccGDVylsrjyvMj_DTZbKacq5WZsyvtG_InjKvRTn_xSC3JQkeCRFTCXFyQEJMyjhWgCAZ4QHXXDHyXSHnvIh1_hDQW5BrIDslWsftg3KYPFAXB2i78p1kioqQSa9NmikgRChjx-InqUM599yRaOB4Z_Xjg7DCIkgIO01JfsXU6IxEskGVuXcIV1EY44CT84I5w-Mr0fwGOyqKMmUodji2raI_SIYRb2EBTtoDBlabB19Dulv8puq4LacjQaRIuWQbA40hGOiepchJMApBaiX6QdYXTnc0f6RFE5GiX1-oYWgOQNi3OA2gJ61PLLA","exp":1735689600,"refresh_token":"eyJhbGciOiJSUzI1NiIsImtpZCI6IjIwMTEtMDQtMjkiLCJ0eXAiOiJKV1QifQ.eyJhdWQiOiJodHRwOi8vYXBpLmV4YW1wbGUuY29tIiwiZXhwIjoxNzM1Njg5NjAwLCJpc3MiOiJodHRwOi8vZXhhbXBsZS5jb20iLCJqdGkiOiJtbmIyM3Zjc3J0NzU2eXVpb21uMTI4NzZidmN4OThlcnR5dWlvcCIsInN1YiI6IjEyMzQ1Njc4OTBxd2VydHl1aW8ifQ.d-2M5oC2H29qZQdEd5LE221fQZwl2L1ibMF_EeG5uOyBVlay705_aU6XRnZ4Y7Ns77C7RPz215is7aDOVydrq48cBbztoezxUvc2r5aT84quvT_QImyiDpWYrErthr9a_UpAEthIwh8AfcizW0fXrhEYifaZp2hxG24x5bQqWssFZo4UCzMzfp90NJuIQ970bl_Q0mJbOv4ao8X14MMb6j4MuqRGKPAt8rQDpcfSkbxgKofC4GrrcaaCa7Y-wrrMjurRJiYKe_y2OKSyKx5T8PsbXxrWzmRhL1nBF3Kq1wHFcz3M0yemyN2q9Af9BY-kyh5cnv_OgcSlb5RmW0O2Xg"} // application/json; charset=utf-8 // DEBUG: [ENDPOINT: /private][JWTSigner] Signer disabled // DEBUG: [ENDPOINT: /private][JWTValidator] Roles will be matched against the key: 'roles' @@ -78,7 +78,7 @@ func Example_HS256() { // output: // token request // 201 - // {"access_token":"eyJhbGciOiJIUzI1NiIsImtpZCI6InNpbTIifQ.eyJhdWQiOiJodHRwOi8vYXBpLmV4YW1wbGUuY29tIiwiZXhwIjoxNzM1Njg5NjAwLCJpc3MiOiJodHRwOi8vZXhhbXBsZS5jb20iLCJqdGkiOiJtbmIyM3Zjc3J0NzU2eXVpb21uYnZjeDk4ZXJ0eXVpb3AiLCJyb2xlcyI6WyJyb2xlX2EiLCJyb2xlX2IiXSwic3ViIjoiMTIzNDU2Nzg5MHF3ZXJ0eXVpbyJ9.vTdN1Nm6Eeb3oJWC5yOpmvwTrwuXFYkqy2131u3G0Hk","exp":1735689600,"refresh_token":"eyJhbGciOiJIUzI1NiIsImtpZCI6InNpbTIifQ.eyJhdWQiOiJodHRwOi8vYXBpLmV4YW1wbGUuY29tIiwiZXhwIjoxNzM1Njg5NjAwLCJpc3MiOiJodHRwOi8vZXhhbXBsZS5jb20iLCJqdGkiOiJtbmIyM3Zjc3J0NzU2eXVpb21uMTI4NzZidmN4OThlcnR5dWlvcCIsInN1YiI6IjEyMzQ1Njc4OTBxd2VydHl1aW8ifQ.F7KWdUacMQX9g2SGk-UMAU0kfC4xUFsuB-QTFdg9P-M"} + // {"access_token":"eyJhbGciOiJIUzI1NiIsImtpZCI6InNpbTIiLCJ0eXAiOiJKV1QifQ.eyJhdWQiOiJodHRwOi8vYXBpLmV4YW1wbGUuY29tIiwiZXhwIjoxNzM1Njg5NjAwLCJpc3MiOiJodHRwOi8vZXhhbXBsZS5jb20iLCJqdGkiOiJtbmIyM3Zjc3J0NzU2eXVpb21uYnZjeDk4ZXJ0eXVpb3AiLCJyb2xlcyI6WyJyb2xlX2EiLCJyb2xlX2IiXSwic3ViIjoiMTIzNDU2Nzg5MHF3ZXJ0eXVpbyJ9.89zdRo4LCHpT93JX3_Yn2LoAOUvEAiFj6X7vnCgOd5Q","exp":1735689600,"refresh_token":"eyJhbGciOiJIUzI1NiIsImtpZCI6InNpbTIiLCJ0eXAiOiJKV1QifQ.eyJhdWQiOiJodHRwOi8vYXBpLmV4YW1wbGUuY29tIiwiZXhwIjoxNzM1Njg5NjAwLCJpc3MiOiJodHRwOi8vZXhhbXBsZS5jb20iLCJqdGkiOiJtbmIyM3Zjc3J0NzU2eXVpb21uMTI4NzZidmN4OThlcnR5dWlvcCIsInN1YiI6IjEyMzQ1Njc4OTBxd2VydHl1aW8ifQ.lJuO1xyI8QOTWNGxBQe2hH90Jdp5y0DEbPd44I728dA"} // map[Content-Type:[application/json; charset=utf-8]] // unauthorized request // 401 @@ -92,7 +92,7 @@ func Example_HS256() { // application/json; charset=utf-8 // refresh token request // 201 - // {"access_token":"eyJhbGciOiJIUzI1NiIsImtpZCI6InNpbTIifQ.eyJhdWQiOiJodHRwOi8vYXBpLmV4YW1wbGUuY29tIiwiZXhwIjoxNzM1Njg5NjAwLCJpc3MiOiJodHRwOi8vZXhhbXBsZS5jb20iLCJqdGkiOiJtbmIyM3Zjc3J0NzU2eXVpb21uYnZjeDk4ZXJ0eXVpb3AiLCJyb2xlcyI6WyJyb2xlX2EiLCJyb2xlX2IiXSwic3ViIjoiMTIzNDU2Nzg5MHF3ZXJ0eXVpbyJ9.vTdN1Nm6Eeb3oJWC5yOpmvwTrwuXFYkqy2131u3G0Hk","exp":1735689600,"refresh_token":"eyJhbGciOiJIUzI1NiIsImtpZCI6InNpbTIifQ.eyJhdWQiOiJodHRwOi8vYXBpLmV4YW1wbGUuY29tIiwiZXhwIjoxNzM1Njg5NjAwLCJpc3MiOiJodHRwOi8vZXhhbXBsZS5jb20iLCJqdGkiOiJtbmIyM3Zjc3J0NzU2eXVpb21uMTI4NzZidmN4OThlcnR5dWlvcCIsInN1YiI6IjEyMzQ1Njc4OTBxd2VydHl1aW8ifQ.F7KWdUacMQX9g2SGk-UMAU0kfC4xUFsuB-QTFdg9P-M"} + // {"access_token":"eyJhbGciOiJIUzI1NiIsImtpZCI6InNpbTIiLCJ0eXAiOiJKV1QifQ.eyJhdWQiOiJodHRwOi8vYXBpLmV4YW1wbGUuY29tIiwiZXhwIjoxNzM1Njg5NjAwLCJpc3MiOiJodHRwOi8vZXhhbXBsZS5jb20iLCJqdGkiOiJtbmIyM3Zjc3J0NzU2eXVpb21uYnZjeDk4ZXJ0eXVpb3AiLCJyb2xlcyI6WyJyb2xlX2EiLCJyb2xlX2IiXSwic3ViIjoiMTIzNDU2Nzg5MHF3ZXJ0eXVpbyJ9.89zdRo4LCHpT93JX3_Yn2LoAOUvEAiFj6X7vnCgOd5Q","exp":1735689600,"refresh_token":"eyJhbGciOiJIUzI1NiIsImtpZCI6InNpbTIiLCJ0eXAiOiJKV1QifQ.eyJhdWQiOiJodHRwOi8vYXBpLmV4YW1wbGUuY29tIiwiZXhwIjoxNzM1Njg5NjAwLCJpc3MiOiJodHRwOi8vZXhhbXBsZS5jb20iLCJqdGkiOiJtbmIyM3Zjc3J0NzU2eXVpb21uMTI4NzZidmN4OThlcnR5dWlvcCIsInN1YiI6IjEyMzQ1Njc4OTBxd2VydHl1aW8ifQ.lJuO1xyI8QOTWNGxBQe2hH90Jdp5y0DEbPd44I728dA"} // application/json; charset=utf-8 // DEBUG: [ENDPOINT: /private][JWTSigner] Signer disabled // DEBUG: [ENDPOINT: /private][JWTValidator] Roles will be matched against the key: 'roles' diff --git a/jws.go b/jws.go index aba0e7c..8e823a5 100644 --- a/jws.go +++ b/jws.go @@ -46,6 +46,7 @@ type SignatureConfig struct { type SignerConfig struct { Alg string `json:"alg"` KeyID string `json:"kid"` + Type string `json:"typ"` URI string `json:"jwk_url"` FullSerialization bool `json:"full,omitempty"` KeysToSign []string `json:"keys_to_sign,omitempty"` @@ -139,8 +140,12 @@ func NewSigner(cfg *config.EndpointConfig, te auth0.RequestTokenExtractor) (*Sig opts := &jose.SignerOptions{ ExtraHeaders: map[jose.HeaderKey]interface{}{ jose.HeaderKey("kid"): key.KeyID, + jose.HeaderKey("typ"): "JWT", }, } + if signerCfg.Type != "" { + opts.ExtraHeaders[jose.HeaderKey("typ")] = signerCfg.Type + } s, err := jose.NewSigner(signingKey, opts) if err != nil { return signerCfg, nopSigner, err diff --git a/jws_test.go b/jws_test.go index 91f6a19..8112368 100644 --- a/jws_test.go +++ b/jws_test.go @@ -100,7 +100,7 @@ func Test_newSigner(t *testing.T) { return } - expected := "eyJhbGciOiJSUzI1NiIsImtpZCI6IjIwMTEtMDQtMjkifQ.eyJhdWQiOiJodHRwOi8vYXBpLmV4YW1wbGUuY29tIiwiaXNzIjoiaHR0cDovL2V4YW1wbGUuY29tIiwianRpIjoibW5iMjN2Y3NydDc1Nnl1aW9tbmJ2Y3g5OGVydHl1aW9wIiwic3ViIjoiMTIzNDU2Nzg5MHF3ZXJ0eXVpbyJ9.TWdsBQPqfDV1IFe1iD0KFu-E_wqeFXgNJXIoESl9smg2W_Snh2GwwktwlvHCSAGvUdkKU6Js6LQ594e6HZ3eAdj3mfCdCxerhuodb6GS-rZ2OrMv44VaC_YnzoOjCWUrU3ivzhYjEFBxgDgWc0G9qFdQVaZPOLPohd_mXpeM5jAS-vFzudOlJz8rtK9KfVDPiAWnGxih5fa3MF1b19vnnsfyN1Y8hTeen3j24thQbuh61vkqu8TLoG2NrETyC9zqCuL3IQnPld3IBolYJhqEcka95cCNZ1dQnqsgrP4q325JmRxXsn0GJM3VtFpKbfJCcQgdpixCohQ-_xHmTUpXng" + expected := "eyJhbGciOiJSUzI1NiIsImtpZCI6IjIwMTEtMDQtMjkiLCJ0eXAiOiJKV1QifQ.eyJhdWQiOiJodHRwOi8vYXBpLmV4YW1wbGUuY29tIiwiaXNzIjoiaHR0cDovL2V4YW1wbGUuY29tIiwianRpIjoibW5iMjN2Y3NydDc1Nnl1aW9tbmJ2Y3g5OGVydHl1aW9wIiwic3ViIjoiMTIzNDU2Nzg5MHF3ZXJ0eXVpbyJ9.n7R8h1gNVOxKQI05xt2TBGIjTvw-TwNa4zAj4lqFowIy9mqpFkyeZg7PrBKA-I3E4TKkXCjO5z4ibMEl28Jwpda1zEZKaojvcFs17MCR4YrlbszMY649qr8F0goRKo9SJmZFkkH4dNZp5oBD8uo6Q28V5uPYXMKGMbnOjModRnpznid-Qfiash3G9ktUC5fhkxev-uAb03c7Q3msJvkCxHpJdLSeJKHxfzAZQWr6i-8CoCZpggtTc6gILZ7dNpAsLHS2hElGFelCBlONEum2ihIjF7dEYGQDlvKR-WGEPsQgRglOKohIbKM9ewQQ0mWYyLoCpY0bKn6IEAIpIvAzcQ" if msg != expected { t.Errorf("unexpected signed payload: %s", msg) } diff --git a/mux/jose_example_test.go b/mux/jose_example_test.go index e35a94b..fe04d9e 100644 --- a/mux/jose_example_test.go +++ b/mux/jose_example_test.go @@ -31,7 +31,7 @@ func Example_RS256() { // output: // token request // 201 - // {"access_token":"eyJhbGciOiJSUzI1NiIsImtpZCI6IjIwMTEtMDQtMjkifQ.eyJhdWQiOiJodHRwOi8vYXBpLmV4YW1wbGUuY29tIiwiZXhwIjoxNzM1Njg5NjAwLCJpc3MiOiJodHRwOi8vZXhhbXBsZS5jb20iLCJqdGkiOiJtbmIyM3Zjc3J0NzU2eXVpb21uYnZjeDk4ZXJ0eXVpb3AiLCJyb2xlcyI6WyJyb2xlX2EiLCJyb2xlX2IiXSwic3ViIjoiMTIzNDU2Nzg5MHF3ZXJ0eXVpbyJ9.NrLwxZK8UhS6CV2ijdJLUfAinpjBn5_uliZCdzQ7v-Dc8lcv1AQA9cYsG63RseKWH9u6-TqPKMZQ56WfhqL028BLDdQCiaeuBoLzYU1tQLakA1V0YmouuEVixWLzueVaQhyGx-iKuiuFhzHWZSqFqSehiyzI9fb5O6Gcc2L6rMEoxQMaJomVS93h-t013MNq3ADLWTXRaO-negydqax_WmzlVWp_RDroR0s5J2L2klgmBXVwh6SYy5vg7RrnuN3S8g4oSicJIi9NgnG-dDikuaOg2DeFUt-mYq_j_PbNXf9TUl5hl4kEy7E0JauJ17d1BUuTl3ChY4BOmhQYRN0dYg","exp":1735689600,"refresh_token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9NmikgRChjx-InqUM599yRaOB4Z_Xjg7DCIkgIO01JfsXU6IxEskGVuXcIV1EY44CT84I5w-Mr0fwGOyqKMmUodji2raI_SIYRb2EBTtoDBlabB19Dulv8puq4LacjQaRIuWQbA40hGOiepchJMApBaiX6QdYXTnc0f6RFE5GiX1-oYWgOQNi3OA2gJ61PLLA","exp":1735689600,"refresh_token":"eyJhbGciOiJSUzI1NiIsImtpZCI6IjIwMTEtMDQtMjkiLCJ0eXAiOiJKV1QifQ.eyJhdWQiOiJodHRwOi8vYXBpLmV4YW1wbGUuY29tIiwiZXhwIjoxNzM1Njg5NjAwLCJpc3MiOiJodHRwOi8vZXhhbXBsZS5jb20iLCJqdGkiOiJtbmIyM3Zjc3J0NzU2eXVpb21uMTI4NzZidmN4OThlcnR5dWlvcCIsInN1YiI6IjEyMzQ1Njc4OTBxd2VydHl1aW8ifQ.d-2M5oC2H29qZQdEd5LE221fQZwl2L1ibMF_EeG5uOyBVlay705_aU6XRnZ4Y7Ns77C7RPz215is7aDOVydrq48cBbztoezxUvc2r5aT84quvT_QImyiDpWYrErthr9a_UpAEthIwh8AfcizW0fXrhEYifaZp2hxG24x5bQqWssFZo4UCzMzfp90NJuIQ970bl_Q0mJbOv4ao8X14MMb6j4MuqRGKPAt8rQDpcfSkbxgKofC4GrrcaaCa7Y-wrrMjurRJiYKe_y2OKSyKx5T8PsbXxrWzmRhL1nBF3Kq1wHFcz3M0yemyN2q9Af9BY-kyh5cnv_OgcSlb5RmW0O2Xg"} // map[Content-Type:[application/json]] // unauthorized request // 401 @@ -57,7 +57,7 @@ func Example_HS256() { // output: // token request // 201 - // {"access_token":"eyJhbGciOiJIUzI1NiIsImtpZCI6InNpbTIifQ.eyJhdWQiOiJodHRwOi8vYXBpLmV4YW1wbGUuY29tIiwiZXhwIjoxNzM1Njg5NjAwLCJpc3MiOiJodHRwOi8vZXhhbXBsZS5jb20iLCJqdGkiOiJtbmIyM3Zjc3J0NzU2eXVpb21uYnZjeDk4ZXJ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1aW8ifQ.lJuO1xyI8QOTWNGxBQe2hH90Jdp5y0DEbPd44I728dA"} // map[Content-Type:[application/json]] // unauthorized request // 401