Skip to content

Add an OAuth module foundation with error codes and PKCE#2631

Merged
jviotti merged 5 commits into
mainfrom
oauth-foundations
Jul 19, 2026
Merged

Add an OAuth module foundation with error codes and PKCE#2631
jviotti merged 5 commits into
mainfrom
oauth-foundations

Conversation

@jviotti

@jviotti jviotti commented Jul 19, 2026

Copy link
Copy Markdown
Member

Signed-off-by: Juan Cruz Viotti jv@jviotti.com

Review in cubic

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Benchmark (macos/llvm)

Details
Benchmark suite Current: 8f4d7b6 Previous: ffb335a Ratio
Regex_Lower_S_Or_Upper_S_Asterisk 1.6040764340149247 ns/iter 1.937626953550779 ns/iter 0.83
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 1.6309841559385618 ns/iter 1.8904228176617022 ns/iter 0.86
Regex_Period_Asterisk 1.9172754984549285 ns/iter 1.7318366665758447 ns/iter 1.11
Regex_Group_Period_Asterisk_Group 1.8280596452088784 ns/iter 2.020316669970787 ns/iter 0.90
Regex_Period_Plus 2.1532616733031738 ns/iter 2.164628717325654 ns/iter 0.99
Regex_Period 2.248742247013246 ns/iter 2.1755147373714125 ns/iter 1.03
Regex_Caret_Period_Plus_Dollar 2.0224768552486934 ns/iter 2.2025404663916652 ns/iter 0.92
Regex_Caret_Group_Period_Plus_Group_Dollar 2.006458386862151 ns/iter 2.0816148958024834 ns/iter 0.96
Regex_Caret_Period_Asterisk_Dollar 1.6888729537280165 ns/iter 1.7534234951531922 ns/iter 0.96
Regex_Caret_Group_Period_Asterisk_Group_Dollar 1.6805125339311429 ns/iter 1.7322614269812608 ns/iter 0.97
Regex_Caret_X_Hyphen 6.076191233226099 ns/iter 6.3489900392202525 ns/iter 0.96
Regex_Period_Md_Dollar 17.4417684830619 ns/iter 17.1745282497741 ns/iter 1.02
Regex_Caret_Slash_Period_Asterisk 4.423020580074404 ns/iter 5.718172468388221 ns/iter 0.77
Regex_Caret_Period_Range_Dollar 1.9567700932574872 ns/iter 2.0695173971612264 ns/iter 0.95
Regex_Nested_Backtrack 26.110644916641878 ns/iter 27.33308090881766 ns/iter 0.96
JSON_Array_Of_Objects_Unique 335.6703021591269 ns/iter 394.0034549834402 ns/iter 0.85
JSON_Parse_1 6259.690376644944 ns/iter 7764.201806063938 ns/iter 0.81
JSON_Parse_Real 6481.5868396493715 ns/iter 7144.800528669932 ns/iter 0.91
JSON_Parse_Decimal 7213.053960794467 ns/iter 7583.009267170878 ns/iter 0.95
JSON_Parse_Schema_ISO_Language 3700501.604394948 ns/iter 3859303.472222564 ns/iter 0.96
JSON_Parse_Integer 4318.5265356047175 ns/iter 4715.304256549305 ns/iter 0.92
JSON_Parse_String_NonSSO_Plain 6761.518062193031 ns/iter 7414.876132996539 ns/iter 0.91
JSON_Parse_String_SSO_Plain 2727.9375641791726 ns/iter 2886.0545066256036 ns/iter 0.95
JSON_Parse_String_Escape_Heavy 19974.788726254636 ns/iter 21628.646127256685 ns/iter 0.92
JSON_Parse_Object_Short_Keys 7644.228156678643 ns/iter 8381.03260683847 ns/iter 0.91
JSON_Parse_Object_Scalar_Properties 4098.171287777521 ns/iter 4830.768012902809 ns/iter 0.85
JSON_Parse_Object_Array_Properties 7122.8428743544355 ns/iter 7325.86993217448 ns/iter 0.97
JSON_Parse_Object_Object_Properties 7285.555792517613 ns/iter 7913.632612486626 ns/iter 0.92
JSON_Parse_Nested_Containers 55886.21590909676 ns/iter 60893.88376735943 ns/iter 0.92
JSON_From_String_Copy 22.09475894759729 ns/iter 23.366710055109873 ns/iter 0.95
JSON_From_String_Temporary 18.299404809345553 ns/iter 19.349984680137958 ns/iter 0.95
JSON_Number_To_Double 31.752698423856327 ns/iter 36.504685776529165 ns/iter 0.87
JSON_Object_At_Last_Key/8 3.911177600832358 ns/iter 4.117379235886124 ns/iter 0.95
JSON_Object_At_Last_Key/32 11.738034866517575 ns/iter 12.317445510931943 ns/iter 0.95
JSON_Object_At_Last_Key/128 55.70663527419065 ns/iter 55.94838474996595 ns/iter 1.00
JSON_Object_At_Last_Key/512 186.4251921121406 ns/iter 189.7980789164383 ns/iter 0.98
JSON_Fast_Hash_Helm_Chart_Lock 58.21946240822294 ns/iter 59.67856993740172 ns/iter 0.98
JSON_Equality_Helm_Chart_Lock 140.8373288703516 ns/iter 144.51639294708173 ns/iter 0.97
JSON_Divisible_By_Decimal 173.57203628926837 ns/iter 179.14223171727252 ns/iter 0.97
JSON_String_Equal/10 7.756104112091215 ns/iter 7.423042696871076 ns/iter 1.04
JSON_String_Equal/100 6.918635854620519 ns/iter 6.785332299998871 ns/iter 1.02
JSON_String_Equal_Small_By_Perfect_Hash/10 0.33602040495337787 ns/iter 0.3402995183419473 ns/iter 0.99
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 3.2542463977916323 ns/iter 3.357782425235061 ns/iter 0.97
JSON_String_Fast_Hash/10 2.4116441201354073 ns/iter 2.4433159098441752 ns/iter 0.99
JSON_String_Fast_Hash/100 2.0185806257552823 ns/iter 2.06162272696843 ns/iter 0.98
JSON_String_Key_Hash/10 1.6844675580356523 ns/iter 1.746578214434296 ns/iter 0.96
JSON_String_Key_Hash/100 2.124440787656633 ns/iter 2.2048972776661055 ns/iter 0.96
JSON_Object_Defines_Miss_Same_Length 2.7146561630677795 ns/iter 2.7328335951275373 ns/iter 0.99
JSON_Object_Defines_Miss_Too_Small 2.6972429689208486 ns/iter 2.691979221781206 ns/iter 1.00
JSON_Object_Defines_Miss_Too_Large 2.6952657045037784 ns/iter 2.76803693583777 ns/iter 0.97
Pointer_Object_Traverse 23.337710437243278 ns/iter 24.563826671259406 ns/iter 0.95
Pointer_Object_Try_Traverse 24.728168967892714 ns/iter 23.29214665187647 ns/iter 1.06
Pointer_Push_Back_Pointer_To_Weak_Pointer 169.23600043962225 ns/iter 157.99450444307098 ns/iter 1.07
Pointer_Walker_Schema_ISO_Language 2782665.724528687 ns/iter 2570136.2629627474 ns/iter 1.08
Pointer_Maybe_Tracked_Deeply_Nested/0 1325312.1067126894 ns/iter 1219733.535528609 ns/iter 1.09
Pointer_Maybe_Tracked_Deeply_Nested/1 1111967.1052632413 ns/iter 1016511.2252663726 ns/iter 1.09
Pointer_Position_Tracker_Get_Deeply_Nested 405.6304160650445 ns/iter 342.39498327985615 ns/iter 1.18
JSONPath_Descendant_Filter_Nested 1636.4572179267489 ns/iter 1285.2299620823585 ns/iter 1.27
URITemplateRouter_Create 23099.72946603107 ns/iter 23867.45736151621 ns/iter 0.97
URITemplateRouter_Match 169.2520726168589 ns/iter 173.6821464023323 ns/iter 0.97
URITemplateRouter_Match_BasePath 197.9992564394915 ns/iter 205.20217573584932 ns/iter 0.96
URITemplateRouterView_Restore 10605.437985270873 ns/iter 10684.969376056257 ns/iter 0.99
URITemplateRouterView_Match 129.60354277868575 ns/iter 128.95338474840426 ns/iter 1.01
URITemplateRouterView_Match_BasePath 154.8850364975444 ns/iter 151.45647636856285 ns/iter 1.02
URITemplateRouterView_Arguments 524.8494157656019 ns/iter 551.8809254554521 ns/iter 0.95
JSONL_Parse_Large 9435964.125000535 ns/iter 11312982.633334437 ns/iter 0.83
JSONL_Parse_Large_GZIP 10393166.666669156 ns/iter 11259218.750000244 ns/iter 0.92
JSONLD_Catalog_Annotation_List_Populate 913969.0278745577 ns/iter 871689.5323192973 ns/iter 1.05
JSONLD_Catalog_Materialize 4187713.602409147 ns/iter 4424669.303797243 ns/iter 0.95
HTML_Build_Table_100000 34962803.57143448 ns/iter 34504766.70000171 ns/iter 1.01
HTML_Render_Table_100000 1516114.4013155424 ns/iter 1527450.5671341869 ns/iter 0.99
GZIP_Compress_ISO_Language_Set_3_Locations 26195402.777779642 ns/iter 26482032.407405615 ns/iter 0.99
GZIP_Decompress_ISO_Language_Set_3_Locations 3124813.5479456084 ns/iter 3103220.64090914 ns/iter 1.01
GZIP_Compress_ISO_Language_Set_3_Schema 1567085.3081893444 ns/iter 1492648.2105262827 ns/iter 1.05
GZIP_Decompress_ISO_Language_Set_3_Schema 339710.2944731574 ns/iter 276695.88174189854 ns/iter 1.23
JOSE_VerifySignature_RS256 26470.703931865206 ns/iter 21795.408603158376 ns/iter 1.21
JOSE_VerifySignature_ES512 1197540.1383332005 ns/iter 1063482.7786378607 ns/iter 1.13

This comment was automatically generated by workflow using github-action-benchmark.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Benchmark (linux/gcc)

Details
Benchmark suite Current: 8f4d7b6 Previous: ffb335a Ratio
JOSE_VerifySignature_RS256 22216.82244476391 ns/iter 19269.012559875697 ns/iter 1.15
JOSE_VerifySignature_ES512 577547.6890547187 ns/iter 502474.0519999682 ns/iter 1.15
GZIP_Compress_ISO_Language_Set_3_Locations 36321193.368424155 ns/iter 30230722.08695695 ns/iter 1.20
GZIP_Decompress_ISO_Language_Set_3_Locations 4165759.970059336 ns/iter 2791045.8725098823 ns/iter 1.49
GZIP_Compress_ISO_Language_Set_3_Schema 2033097.127536087 ns/iter 1738386.2977668045 ns/iter 1.17
GZIP_Decompress_ISO_Language_Set_3_Schema 379928.2590785647 ns/iter 197302.60398860773 ns/iter 1.93
HTML_Build_Table_100000 69053525.10000286 ns/iter 56794516.24999861 ns/iter 1.22
HTML_Render_Table_100000 1820426.8779843443 ns/iter 1851807.1690140727 ns/iter 0.98
JSONLD_Catalog_Annotation_List_Populate 1300607.3881699073 ns/iter 1027972.8956521942 ns/iter 1.27
JSONLD_Catalog_Materialize 6875911.2621358065 ns/iter 5256181.696296591 ns/iter 1.31
JSONL_Parse_Large 14057319.859998643 ns/iter 10097167.65217352 ns/iter 1.39
JSONL_Parse_Large_GZIP 15420507.711110076 ns/iter 11179262.499999529 ns/iter 1.38
URITemplateRouter_Create 30492.927591600117 ns/iter 22688.650224215584 ns/iter 1.34
URITemplateRouter_Match 164.23051399814906 ns/iter 119.14377506309421 ns/iter 1.38
URITemplateRouter_Match_BasePath 184.8023000424989 ns/iter 141.90100046258786 ns/iter 1.30
URITemplateRouterView_Restore 8464.96665910318 ns/iter 7689.636281607475 ns/iter 1.10
URITemplateRouterView_Match 124.56280335814569 ns/iter 93.50240339497782 ns/iter 1.33
URITemplateRouterView_Match_BasePath 144.82468350260336 ns/iter 105.30027186657217 ns/iter 1.38
URITemplateRouterView_Arguments 477.4145180409085 ns/iter 366.24989790788806 ns/iter 1.30
JSONPath_Descendant_Filter_Nested 1766.5576333505976 ns/iter 1422.2511903715028 ns/iter 1.24
Pointer_Object_Traverse 30.212733049988614 ns/iter 25.48014086324805 ns/iter 1.19
Pointer_Object_Try_Traverse 25.325096321429708 ns/iter 20.650795257355696 ns/iter 1.23
Pointer_Push_Back_Pointer_To_Weak_Pointer 148.82837578820389 ns/iter 118.48630391155913 ns/iter 1.26
Pointer_Walker_Schema_ISO_Language 2726873.0778210377 ns/iter 2211438.7650792613 ns/iter 1.23
Pointer_Maybe_Tracked_Deeply_Nested/0 1894101.9046322536 ns/iter 1493230.133192319 ns/iter 1.27
Pointer_Maybe_Tracked_Deeply_Nested/1 1724314.3118809266 ns/iter 1281496.009328285 ns/iter 1.35
Pointer_Position_Tracker_Get_Deeply_Nested 444.86929502505626 ns/iter 334.1226343894637 ns/iter 1.33
JSON_Array_Of_Objects_Unique 436.2608067658692 ns/iter 311.56312723909946 ns/iter 1.40
JSON_Parse_1 9999.722382159007 ns/iter 7506.332228116863 ns/iter 1.33
JSON_Parse_Real 7981.305673449806 ns/iter 5958.742374833701 ns/iter 1.34
JSON_Parse_Decimal 13023.645934257253 ns/iter 8704.948217972345 ns/iter 1.50
JSON_Parse_Schema_ISO_Language 6617663.238095398 ns/iter 5270149.240601754 ns/iter 1.26
JSON_Parse_Integer 5770.84987635966 ns/iter 4475.419850912155 ns/iter 1.29
JSON_Parse_String_NonSSO_Plain 12415.024864769945 ns/iter 9540.31893276085 ns/iter 1.30
JSON_Parse_String_SSO_Plain 5142.667060090679 ns/iter 3921.2343777926853 ns/iter 1.31
JSON_Parse_String_Escape_Heavy 25839.63503703496 ns/iter 19438.01823445962 ns/iter 1.33
JSON_Parse_Object_Short_Keys 13903.7519961677 ns/iter 11152.015675830438 ns/iter 1.25
JSON_Parse_Object_Scalar_Properties 7219.961441530494 ns/iter 5721.85283092661 ns/iter 1.26
JSON_Parse_Object_Array_Properties 12482.734417924446 ns/iter 9835.396409862953 ns/iter 1.27
JSON_Parse_Object_Object_Properties 12490.390360075951 ns/iter 9412.264154533777 ns/iter 1.33
JSON_Parse_Nested_Containers 103396.06882532993 ns/iter 76073.15527604663 ns/iter 1.36
JSON_From_String_Copy 18.16599749416625 ns/iter 15.054948071954417 ns/iter 1.21
JSON_From_String_Temporary 15.358413461128333 ns/iter 12.416068628209937 ns/iter 1.24
JSON_Number_To_Double 20.60088038222136 ns/iter 15.016651003093394 ns/iter 1.37
JSON_Object_At_Last_Key/8 3.8157353090252415 ns/iter 3.2482215697803416 ns/iter 1.17
JSON_Object_At_Last_Key/32 11.884928550533573 ns/iter 10.347065408369513 ns/iter 1.15
JSON_Object_At_Last_Key/128 48.621717926421226 ns/iter 36.63828787094272 ns/iter 1.33
JSON_Object_At_Last_Key/512 360.52868194837316 ns/iter 222.08443596244095 ns/iter 1.62
JSON_Fast_Hash_Helm_Chart_Lock 62.072432480255976 ns/iter 56.402384656019656 ns/iter 1.10
JSON_Equality_Helm_Chart_Lock 158.6013778266512 ns/iter 131.33703084723592 ns/iter 1.21
JSON_Divisible_By_Decimal 257.0163311623454 ns/iter 191.94849976368604 ns/iter 1.34
JSON_String_Equal/10 5.3804894745916 ns/iter 4.159726313904709 ns/iter 1.29
JSON_String_Equal/100 5.998772722321821 ns/iter 4.944682245719452 ns/iter 1.21
JSON_String_Equal_Small_By_Perfect_Hash/10 0.6242494751288266 ns/iter 0.55375787168226 ns/iter 1.13
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 25.194948451886088 ns/iter 17.058347952007555 ns/iter 1.48
JSON_String_Fast_Hash/10 2.2608284514488615 ns/iter 1.9099189737350866 ns/iter 1.18
JSON_String_Fast_Hash/100 2.2649560502969597 ns/iter 1.910142439276069 ns/iter 1.19
JSON_String_Key_Hash/10 1.2464382818242419 ns/iter 0.8425344570889336 ns/iter 1.48
JSON_String_Key_Hash/100 12.445750603503448 ns/iter 11.632895519956548 ns/iter 1.07
JSON_Object_Defines_Miss_Same_Length 3.120870720511809 ns/iter 2.4626781623550187 ns/iter 1.27
JSON_Object_Defines_Miss_Too_Small 3.1249508957729866 ns/iter 2.7299176183942166 ns/iter 1.14
JSON_Object_Defines_Miss_Too_Large 3.1145949243398983 ns/iter 2.4577645279724196 ns/iter 1.27
Regex_Lower_S_Or_Upper_S_Asterisk 0.9357153392839535 ns/iter 0.8189083049598953 ns/iter 1.14
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 0.6229606827762584 ns/iter 0.5455780613806327 ns/iter 1.14
Regex_Period_Asterisk 0.9342713607153684 ns/iter 0.8206854462256119 ns/iter 1.14
Regex_Group_Period_Asterisk_Group 0.6240208456787621 ns/iter 0.5461662019740025 ns/iter 1.14
Regex_Period_Plus 0.9708805611155902 ns/iter 0.8201753173136753 ns/iter 1.18
Regex_Period 0.6257918148836189 ns/iter 0.5480180943541612 ns/iter 1.14
Regex_Caret_Period_Plus_Dollar 0.9349566184012698 ns/iter 0.8180625418480957 ns/iter 1.14
Regex_Caret_Group_Period_Plus_Group_Dollar 0.6228848913151701 ns/iter 0.5456129277032484 ns/iter 1.14
Regex_Caret_Period_Asterisk_Dollar 0.9346020482510154 ns/iter 0.8184130734720441 ns/iter 1.14
Regex_Caret_Group_Period_Asterisk_Group_Dollar 0.6238896823893351 ns/iter 0.5457686818407942 ns/iter 1.14
Regex_Caret_X_Hyphen 4.401319741706905 ns/iter 3.2722069470176876 ns/iter 1.35
Regex_Period_Md_Dollar 30.949433155240172 ns/iter 25.538976152435563 ns/iter 1.21
Regex_Caret_Slash_Period_Asterisk 4.66999459916393 ns/iter 3.2722559647255323 ns/iter 1.43
Regex_Caret_Period_Range_Dollar 1.2768233747588071 ns/iter 1.0909875248261498 ns/iter 1.17
Regex_Nested_Backtrack 40.890208575028566 ns/iter 31.673224801258755 ns/iter 1.29

This comment was automatically generated by workflow using github-action-benchmark.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Benchmark (linux/llvm)

Details
Benchmark suite Current: 8f4d7b6 Previous: ffb335a Ratio
Regex_Lower_S_Or_Upper_S_Asterisk 2.505979177794701 ns/iter 2.5147144499961542 ns/iter 1.00
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 2.192931845767948 ns/iter 2.200198422830317 ns/iter 1.00
Regex_Period_Asterisk 2.195040160048225 ns/iter 2.1958107992623885 ns/iter 1.00
Regex_Group_Period_Asterisk_Group 2.493548797755832 ns/iter 2.4949332713161887 ns/iter 1.00
Regex_Period_Plus 2.8049990514397023 ns/iter 3.1172713590700227 ns/iter 0.90
Regex_Period 2.490476072403778 ns/iter 2.8152439227904575 ns/iter 0.88
Regex_Caret_Period_Plus_Dollar 2.4906495998275826 ns/iter 2.8054789367618373 ns/iter 0.89
Regex_Caret_Group_Period_Plus_Group_Dollar 2.8032893869737925 ns/iter 3.120013859247977 ns/iter 0.90
Regex_Caret_Period_Asterisk_Dollar 2.4902161741038347 ns/iter 3.7385086586649354 ns/iter 0.67
Regex_Caret_Group_Period_Asterisk_Group_Dollar 2.1915925868099717 ns/iter 3.4265687466542745 ns/iter 0.64
Regex_Caret_X_Hyphen 5.297237325775644 ns/iter 6.549718985533537 ns/iter 0.81
Regex_Period_Md_Dollar 27.850976547146484 ns/iter 27.838729391932144 ns/iter 1.00
Regex_Caret_Slash_Period_Asterisk 5.916702321135104 ns/iter 7.180020030607899 ns/iter 0.82
Regex_Caret_Period_Range_Dollar 3.1155174365529454 ns/iter 4.361270542216492 ns/iter 0.71
Regex_Nested_Backtrack 38.4715663238962 ns/iter 38.631343276003804 ns/iter 1.00
JSON_Array_Of_Objects_Unique 467.8941088489335 ns/iter 441.7522882000669 ns/iter 1.06
JSON_Parse_1 4915.105043371334 ns/iter 5011.543240000265 ns/iter 0.98
JSON_Parse_Real 5428.430124095224 ns/iter 5354.631574529127 ns/iter 1.01
JSON_Parse_Decimal 7536.977413482469 ns/iter 7652.7279553816115 ns/iter 0.98
JSON_Parse_Schema_ISO_Language 3547025.0558374496 ns/iter 3549425.5431471923 ns/iter 1.00
JSON_Parse_Integer 3725.6589526396347 ns/iter 3752.3804579935068 ns/iter 0.99
JSON_Parse_String_NonSSO_Plain 5105.3805813802 ns/iter 5295.378440575593 ns/iter 0.96
JSON_Parse_String_SSO_Plain 2768.3734454794494 ns/iter 2774.872837112845 ns/iter 1.00
JSON_Parse_String_Escape_Heavy 14191.211695293785 ns/iter 14316.020178738185 ns/iter 0.99
JSON_Parse_Object_Short_Keys 7900.305327915537 ns/iter 8203.652895847332 ns/iter 0.96
JSON_Parse_Object_Scalar_Properties 4076.5289585622722 ns/iter 4225.802996553035 ns/iter 0.96
JSON_Parse_Object_Array_Properties 5664.7566454723465 ns/iter 5729.54175395134 ns/iter 0.99
JSON_Parse_Object_Object_Properties 5741.813187444427 ns/iter 5518.3634049636985 ns/iter 1.04
JSON_Parse_Nested_Containers 44477.58464968044 ns/iter 45581.150674271514 ns/iter 0.98
JSON_From_String_Copy 20.26446874779912 ns/iter 22.29018621632644 ns/iter 0.91
JSON_From_String_Temporary 17.775396159550326 ns/iter 20.025877257070476 ns/iter 0.89
JSON_Number_To_Double 24.03909099605467 ns/iter 24.051404702873956 ns/iter 1.00
JSON_Object_At_Last_Key/8 3.9291839838987395 ns/iter 3.821628423145995 ns/iter 1.03
JSON_Object_At_Last_Key/32 12.316944381725964 ns/iter 12.319841168926386 ns/iter 1.00
JSON_Object_At_Last_Key/128 49.45652052937534 ns/iter 49.488005012833 ns/iter 1.00
JSON_Object_At_Last_Key/512 393.67619944244365 ns/iter 393.3168268692575 ns/iter 1.00
JSON_Fast_Hash_Helm_Chart_Lock 69.63503504829306 ns/iter 66.33712256389491 ns/iter 1.05
JSON_Equality_Helm_Chart_Lock 166.40379424011505 ns/iter 166.2134719509099 ns/iter 1.00
JSON_Divisible_By_Decimal 253.61822398369355 ns/iter 252.77622546740912 ns/iter 1.00
JSON_String_Equal/10 5.977642398375122 ns/iter 5.9224552543235776 ns/iter 1.01
JSON_String_Equal/100 6.612830398513089 ns/iter 6.546842776439634 ns/iter 1.01
JSON_String_Equal_Small_By_Perfect_Hash/10 0.9363200887602271 ns/iter 0.9355860597401499 ns/iter 1.00
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 10.588659918170665 ns/iter 10.589839036725682 ns/iter 1.00
JSON_String_Fast_Hash/10 2.804903873864593 ns/iter 2.8109281888590383 ns/iter 1.00
JSON_String_Fast_Hash/100 2.8031397488587015 ns/iter 2.8042334282581804 ns/iter 1.00
JSON_String_Key_Hash/10 2.1805468173183997 ns/iter 2.1820091815991014 ns/iter 1.00
JSON_String_Key_Hash/100 6.545390969725805 ns/iter 6.539084300416065 ns/iter 1.00
JSON_Object_Defines_Miss_Same_Length 3.4245292638768974 ns/iter 3.426571487242237 ns/iter 1.00
JSON_Object_Defines_Miss_Too_Small 3.0545195281772646 ns/iter 3.1349869218101984 ns/iter 0.97
JSON_Object_Defines_Miss_Too_Large 2.7145535693492877 ns/iter 2.7242211697062446 ns/iter 1.00
Pointer_Object_Traverse 28.87133257143594 ns/iter 28.55893293476743 ns/iter 1.01
Pointer_Object_Try_Traverse 31.27302186635376 ns/iter 31.588959715967196 ns/iter 0.99
Pointer_Push_Back_Pointer_To_Weak_Pointer 149.54843983502428 ns/iter 158.79283496533571 ns/iter 0.94
Pointer_Walker_Schema_ISO_Language 2680368.279693731 ns/iter 2832116.5887096217 ns/iter 0.95
Pointer_Maybe_Tracked_Deeply_Nested/0 1241476.5871886027 ns/iter 1295979.0752688197 ns/iter 0.96
Pointer_Maybe_Tracked_Deeply_Nested/1 1670194.1499999997 ns/iter 1659522.3525177806 ns/iter 1.01
Pointer_Position_Tracker_Get_Deeply_Nested 677.5374066639611 ns/iter 675.917736531884 ns/iter 1.00
JSONPath_Descendant_Filter_Nested 1576.2831559833578 ns/iter 1576.0266117497163 ns/iter 1.00
URITemplateRouter_Create 32189.976949214168 ns/iter 33119.799509074444 ns/iter 0.97
URITemplateRouter_Match 179.0123354307073 ns/iter 182.3400897306013 ns/iter 0.98
URITemplateRouter_Match_BasePath 206.01246944543183 ns/iter 208.79399617094384 ns/iter 0.99
URITemplateRouterView_Restore 8614.50195028797 ns/iter 8500.031415124558 ns/iter 1.01
URITemplateRouterView_Match 164.6922867024345 ns/iter 164.28235581433373 ns/iter 1.00
URITemplateRouterView_Match_BasePath 186.1617397791874 ns/iter 187.0577897189974 ns/iter 1.00
URITemplateRouterView_Arguments 436.3925187013514 ns/iter 431.61343852162656 ns/iter 1.01
JSONL_Parse_Large 9723845.972222498 ns/iter 10106138.76811654 ns/iter 0.96
JSONL_Parse_Large_GZIP 11308703.370968577 ns/iter 11692868.6499989 ns/iter 0.97
JSONLD_Catalog_Annotation_List_Populate 1286678.435100558 ns/iter 1362819.0155641933 ns/iter 0.94
JSONLD_Catalog_Materialize 4353970.28025488 ns/iter 4226707.813252945 ns/iter 1.03
HTML_Build_Table_100000 68299217.49999812 ns/iter 69262285.50000814 ns/iter 0.99
HTML_Render_Table_100000 5529922.390624442 ns/iter 5899025.63247809 ns/iter 0.94
GZIP_Compress_ISO_Language_Set_3_Locations 33460725.238093063 ns/iter 33432148.285712738 ns/iter 1.00
GZIP_Decompress_ISO_Language_Set_3_Locations 4378444.487500133 ns/iter 4128912.7159766043 ns/iter 1.06
GZIP_Compress_ISO_Language_Set_3_Schema 1889692.0189700134 ns/iter 1887711.5297297332 ns/iter 1.00
GZIP_Decompress_ISO_Language_Set_3_Schema 352139.123680226 ns/iter 351612.21776213916 ns/iter 1.00
JOSE_VerifySignature_RS256 58266.38082556745 ns/iter 58198.98333889278 ns/iter 1.00
JOSE_VerifySignature_ES512 2410651.355172251 ns/iter 2452540.5543858814 ns/iter 0.98

This comment was automatically generated by workflow using github-action-benchmark.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Benchmark (windows/msvc)

Details
Benchmark suite Current: 8f4d7b6 Previous: ffb335a Ratio
Regex_Lower_S_Or_Upper_S_Asterisk 5.402336607143558 ns/iter 5.325450000000274 ns/iter 1.01
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 5.013787077011519 ns/iter 5.02332000000024 ns/iter 1.00
Regex_Period_Asterisk 5.019659999999249 ns/iter 5.023525892856436 ns/iter 1.00
Regex_Group_Period_Asterisk_Group 5.0254819999997835 ns/iter 5.024803999999676 ns/iter 1.00
Regex_Period_Plus 5.019794999999476 ns/iter 5.032599000001028 ns/iter 1.00
Regex_Period 5.328367857143031 ns/iter 5.42673799999875 ns/iter 0.98
Regex_Caret_Period_Plus_Dollar 5.029704999999467 ns/iter 5.037386999999853 ns/iter 1.00
Regex_Caret_Group_Period_Plus_Group_Dollar 5.335341964286248 ns/iter 5.33107199999904 ns/iter 1.00
Regex_Caret_Period_Asterisk_Dollar 5.448583035714146 ns/iter 5.34047899999905 ns/iter 1.02
Regex_Caret_Group_Period_Asterisk_Group_Dollar 5.0221639999995205 ns/iter 5.01822200000106 ns/iter 1.00
Regex_Caret_X_Hyphen 8.487539694252183 ns/iter 8.483563616071674 ns/iter 1.00
Regex_Period_Md_Dollar 44.67450607433462 ns/iter 44.67121768151808 ns/iter 1.00
Regex_Caret_Slash_Period_Asterisk 7.882204241071682 ns/iter 7.862168526785292 ns/iter 1.00
Regex_Caret_Period_Range_Dollar 6.425998214285958 ns/iter 6.027856250000241 ns/iter 1.07
Regex_Nested_Backtrack 55.20061000000851 ns/iter 55.72769000000335 ns/iter 0.99
JSON_Array_Of_Objects_Unique 584.0920535714897 ns/iter 576.2308928571055 ns/iter 1.01
JSON_Parse_1 8898.633934670457 ns/iter 8807.0205043739 ns/iter 1.01
JSON_Parse_Real 16019.770089287074 ns/iter 15986.671874997124 ns/iter 1.00
JSON_Parse_Decimal 11825.124999999405 ns/iter 12869.68571428458 ns/iter 0.92
JSON_Parse_Schema_ISO_Language 7393081.111110355 ns/iter 7968938.888891191 ns/iter 0.93
JSON_Parse_Integer 7538.820535714308 ns/iter 6221.467857143028 ns/iter 1.21
JSON_Parse_String_NonSSO_Plain 9581.771205356812 ns/iter 7705.371651786561 ns/iter 1.24
JSON_Parse_String_SSO_Plain 4553.17744968315 ns/iter 3617.329941660261 ns/iter 1.26
JSON_Parse_String_Escape_Heavy 22504.14374999821 ns/iter 22093.079318311036 ns/iter 1.02
JSON_Parse_Object_Short_Keys 13430.525533367834 ns/iter 13540.194463418315 ns/iter 0.99
JSON_Parse_Object_Scalar_Properties 6917.481250000484 ns/iter 6931.152901784746 ns/iter 1.00
JSON_Parse_Object_Array_Properties 11819.657142855329 ns/iter 11476.953125001188 ns/iter 1.03
JSON_Parse_Object_Object_Properties 12063.955357141205 ns/iter 11685.535937498771 ns/iter 1.03
JSON_Parse_Nested_Containers 79769.30803570425 ns/iter 79302.34375001432 ns/iter 1.01
JSON_From_String_Copy 63.843446428575945 ns/iter 64.33250892856432 ns/iter 0.99
JSON_From_String_Temporary 59.68849107143269 ns/iter 58.6841399999912 ns/iter 1.02
JSON_Number_To_Double 121.4740714285613 ns/iter 121.39832812501083 ns/iter 1.00
JSON_Object_At_Last_Key/8 7.306125000000512 ns/iter 7.523287500000769 ns/iter 0.97
JSON_Object_At_Last_Key/32 23.362117857142756 ns/iter 23.257549963644394 ns/iter 1.00
JSON_Object_At_Last_Key/128 89.3348129761187 ns/iter 89.52698707468898 ns/iter 1.00
JSON_Object_At_Last_Key/512 423.24917327552447 ns/iter 421.01316424049503 ns/iter 1.01
JSON_Fast_Hash_Helm_Chart_Lock 101.03715620370821 ns/iter 102.50433024535242 ns/iter 0.99
JSON_Equality_Helm_Chart_Lock 208.65097729237647 ns/iter 210.0375312499381 ns/iter 0.99
JSON_Divisible_By_Decimal 298.9667054724933 ns/iter 300.2838972898012 ns/iter 1.00
JSON_String_Equal/10 10.362812900166489 ns/iter 10.404530310694724 ns/iter 1.00
JSON_String_Equal/100 11.626542187499922 ns/iter 11.65516785714463 ns/iter 1.00
JSON_String_Equal_Small_By_Perfect_Hash/10 2.508959642856975 ns/iter 2.5389612694875017 ns/iter 0.99
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 14.199496811611114 ns/iter 14.247295248893755 ns/iter 1.00
JSON_String_Fast_Hash/10 6.66626674107107 ns/iter 6.605382142857204 ns/iter 1.01
JSON_String_Fast_Hash/100 6.595988839284773 ns/iter 6.599022321428346 ns/iter 1.00
JSON_String_Key_Hash/10 5.356122999999116 ns/iter 5.33767142857146 ns/iter 1.00
JSON_String_Key_Hash/100 11.898021428570312 ns/iter 11.876854687496774 ns/iter 1.00
JSON_Object_Defines_Miss_Same_Length 3.7704557075530016 ns/iter 3.774200886117849 ns/iter 1.00
JSON_Object_Defines_Miss_Too_Small 4.1180568731617475 ns/iter 4.09032290909028 ns/iter 1.01
JSON_Object_Defines_Miss_Too_Large 3.7800658861081593 ns/iter 3.8306057074447684 ns/iter 0.99
Pointer_Object_Traverse 72.1865714285741 ns/iter 70.69666964284238 ns/iter 1.02
Pointer_Object_Try_Traverse 71.14710714286535 ns/iter 70.93341517858676 ns/iter 1.00
Pointer_Push_Back_Pointer_To_Weak_Pointer 184.9974808033552 ns/iter 186.21665948364256 ns/iter 0.99
Pointer_Walker_Schema_ISO_Language 12186366.071428472 ns/iter 12365901.785715649 ns/iter 0.99
Pointer_Maybe_Tracked_Deeply_Nested/0 2385291.785714117 ns/iter 2484164.6586345774 ns/iter 0.96
Pointer_Maybe_Tracked_Deeply_Nested/1 3604195.384614519 ns/iter 3731608.021390326 ns/iter 0.97
Pointer_Position_Tracker_Get_Deeply_Nested 511.0216964285184 ns/iter 534.5219771945068 ns/iter 0.96
JSONPath_Descendant_Filter_Nested 2381.6765829503274 ns/iter 2382.8653571423993 ns/iter 1.00
URITemplateRouter_Create 40772.02434760973 ns/iter 41062.36967395839 ns/iter 0.99
URITemplateRouter_Match 235.58521924265736 ns/iter 235.4255624999979 ns/iter 1.00
URITemplateRouter_Match_BasePath 268.9106414692384 ns/iter 267.773614632753 ns/iter 1.00
URITemplateRouterView_Restore 31533.194791977265 ns/iter 33751.63392857213 ns/iter 0.93
URITemplateRouterView_Match 177.63623734172944 ns/iter 177.8633462377706 ns/iter 1.00
URITemplateRouterView_Match_BasePath 202.3672186442742 ns/iter 202.10211151328815 ns/iter 1.00
URITemplateRouterView_Arguments 546.5848999999707 ns/iter 540.8795535714717 ns/iter 1.01
JSONL_Parse_Large 33584105.26315262 ns/iter 33376647.619044367 ns/iter 1.01
JSONL_Parse_Large_GZIP 34538335.00000201 ns/iter 33858425.00000535 ns/iter 1.02
JSONLD_Catalog_Annotation_List_Populate 2673024.4979921645 ns/iter 2662312.0481936242 ns/iter 1.00
JSONLD_Catalog_Materialize 8006554.666668914 ns/iter 8216093.333332234 ns/iter 0.97
HTML_Build_Table_100000 88369922.22222762 ns/iter 87481936.3636396 ns/iter 1.01
HTML_Render_Table_100000 7970386.666667966 ns/iter 7739532.222222403 ns/iter 1.03
GZIP_Compress_ISO_Language_Set_3_Locations 35994547.368414044 ns/iter 35951078.947367646 ns/iter 1.00
GZIP_Decompress_ISO_Language_Set_3_Locations 9826813.333332514 ns/iter 9890618.66666816 ns/iter 0.99
GZIP_Compress_ISO_Language_Set_3_Schema 2109551.3043476692 ns/iter 2126243.768115919 ns/iter 0.99
GZIP_Decompress_ISO_Language_Set_3_Schema 624193.5999998987 ns/iter 608624.7321430197 ns/iter 1.03
JOSE_VerifySignature_RS256 21705.6281249981 ns/iter 21296.731250004086 ns/iter 1.02
JOSE_VerifySignature_ES512 1540847.098214369 ns/iter 1535896.6517854559 ns/iter 1.00

This comment was automatically generated by workflow using github-action-benchmark.

@jviotti
jviotti force-pushed the oauth-foundations branch from cbc96f6 to b232a94 Compare July 19, 2026 22:21
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
@jviotti
jviotti force-pushed the oauth-foundations branch from b232a94 to 82e6236 Compare July 19, 2026 22:32
@jviotti
jviotti marked this pull request as ready for review July 19, 2026 22:41
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

All reported issues were addressed

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread src/core/oauth/include/sourcemeta/core/oauth_bearer.h Outdated
Comment thread src/core/oauth/include/sourcemeta/core/oauth_error.h
Comment thread src/core/oauth/include/sourcemeta/core/oauth_profile.h Outdated
Comment thread src/core/oauth/oauth_bearer.cc Outdated
Comment thread config.cmake.in
Comment thread src/core/oauth/include/sourcemeta/core/oauth_pkce.h
Comment thread src/core/oauth/include/sourcemeta/core/oauth_bearer.h Outdated
Comment thread src/core/oauth/oauth_pkce.cc Outdated
@augmentcode

augmentcode Bot commented Jul 19, 2026

Copy link
Copy Markdown
🤖 Augment PR Summary

Summary: Adds a new sourcemeta::core::oauth module that establishes foundational helpers for OAuth 2.0/2.1 messaging (error codes, PKCE, and Bearer utilities).

Changes:

  • Introduced the SOURCEMETA_CORE_OAUTH CMake option and wired the new component into the top-level build, install package config, and test suite.
  • Added public OAuth headers for profiles, error enums + code mapping/parsing, PKCE methods/outcomes, and Bearer header/challenge utilities.
  • Implemented PKCE verifier minting, S256 challenge derivation, and verifier/challenge verification under strict vs compatible profiles.
  • Implemented Bearer Authorization header construction and robust parsing of WWW-Authenticate challenges to extract parameters.
  • Added unit tests covering error-code round-trips, PKCE behaviour, and header parsing edge cases.
  • Updated website CI workflows to disable building the OAuth component for docs builds.

🤖 Was this summary useful? React with 👍 or 👎

@augmentcode augmentcode Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Review completed. 2 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

Comment thread src/core/oauth/oauth_bearer.cc Outdated
// is a parameter of the current challenge
std::string_view current_scheme{};
while (position < header.size()) {
// RFC 9110 Section 5.6.1 list rule: skip optional whitespace and the commas

@augmentcode augmentcode Bot Jul 19, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

src/core/oauth/oauth_bearer.cc:55: oauth_challenge_parameter skips OWS even when it isn’t preceded by a comma, so a header missing the required comma separators (e.g. Bearer realm="x" error="y") can still return a value. That seems to contradict both the RFC 7235 list grammar and the docstring promise to return nullopt when the header is malformed before the parameter is reached.

Severity: low

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

/// @ingroup oauth
/// Verify a presented code verifier against a stored code challenge and its
/// method, under the given profile, returning the pairing outcome. An empty
/// verifier or challenge means the value is absent. The final verifier against

@augmentcode augmentcode Bot Jul 19, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

src/core/oauth/include/sourcemeta/core/oauth_pkce.h:128: The doc says the final verifier-vs-challenge comparison is constant time, but the implementation uses secure_equals, which returns immediately when lengths differ. With the plain method, a length mismatch won’t be constant-time, so this comment may be slightly overstated.

Severity: low

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

2 issues found across 10 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="src/core/oauth/oauth_bearer.cc">

<violation number="1" location="src/core/oauth/oauth_bearer.cc:126">
P2: Duplicate auth-param names before a requested parameter are accepted as a valid challenge. Track names per challenge and return `nullopt` when a duplicate is encountered, so malformed headers are not used.</violation>

<violation number="2" location="src/core/oauth/oauth_bearer.cc:138">
P2: A bare challenge followed by another scheme without a comma is accepted and its parameters are returned. Preserve enough challenge state to reject `Bearer DPoP realm="x"`; a new scheme after a bare scheme must have a comma delimiter.</violation>
</file>

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

// The token is a new scheme. It may be followed by a token68 credential,
// which is skipped whole so the scan reaches the next challenge
current_scheme = token;
scheme_has_parameter = false;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2: A bare challenge followed by another scheme without a comma is accepted and its parameters are returned. Preserve enough challenge state to reject Bearer DPoP realm="x"; a new scheme after a bare scheme must have a comma delimiter.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/core/oauth/oauth_bearer.cc, line 138:

<comment>A bare challenge followed by another scheme without a comma is accepted and its parameters are returned. Preserve enough challenge state to reject `Bearer DPoP realm="x"`; a new scheme after a bare scheme must have a comma delimiter.</comment>

<file context>
@@ -115,6 +135,7 @@ auto oauth_challenge_parameter(const std::string_view header,
     // The token is a new scheme. It may be followed by a token68 credential,
     // which is skipped whole so the scan reaches the next challenge
     current_scheme = token;
+    scheme_has_parameter = false;
     const auto separator{oauth_skip_ows(header, after_token)};
     if (separator > after_token && separator < header.size()) {
</file context>

value = header.substr(value_start, position - value_start);
}

scheme_has_parameter = true;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2: Duplicate auth-param names before a requested parameter are accepted as a valid challenge. Track names per challenge and return nullopt when a duplicate is encountered, so malformed headers are not used.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/core/oauth/oauth_bearer.cc, line 126:

<comment>Duplicate auth-param names before a requested parameter are accepted as a valid challenge. Track names per challenge and return `nullopt` when a duplicate is encountered, so malformed headers are not used.</comment>

<file context>
@@ -105,8 +123,10 @@ auto oauth_challenge_parameter(const std::string_view header,
         value = header.substr(value_start, position - value_start);
       }
 
+      scheme_has_parameter = true;
+      separator_required = true;
       if (match) {
</file context>

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

All reported issues were addressed across 6 files (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment thread test/oauth/oauth_pkce_test.cc Outdated
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
@jviotti
jviotti merged commit c2e9865 into main Jul 19, 2026
12 checks passed
@jviotti
jviotti deleted the oauth-foundations branch July 19, 2026 23:48
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.

1 participant