Match google oauth client_id
adrianlzt opened this issue · 2 comments
adrianlzt commented
Describe the bug
Allow a more general url pattern to be able to match URLs like:
https://accounts.google.com/o/oauth2/v2/auth?client_id=1011112465-4naqjq0qcaqkai02r8slf3u8qlbn6g8i.apps.googleusercontent.com&code_challenge=HcSAHUkKcgDI&code_challenge_method=S256&nonce=n_x0umEr&redirect_uri=http%3A%2F%2Flocalhost%3A8250%2Foidc%2Fcallback&response_type=code&scope=openid+profile+email&state=st_sjpUxE1
Each OAuth have a differente client_id, so I was trying something like:
url_pattern: https://accounts.google.com/o/oauth2/v2/auth?client_id=1011112465**
But does not work.
Maybe allowing regexp?
liias commented
Hi Adrián
I realize the syntax is pretty obscure when matching query parameters. But it does support it!
This should work for you:
https://accounts.google.com/o/oauth2/v2/auth?client_id=1011112465*&**
So, basically query parameter matcher is:
client_id=1011112465*
to match a query parameter that starts withclient_id=1011112465
&**
to match 1 or more additional query parameters- (
&*
would match exactly 1 additional query parameter)
But indeed, there's not really a way to match a parameter, and then additionally an optional parameter. (because /a/**
glob does not match /a
but does match /a/
)
Regex might make sense in future.
adrianlzt commented
That worked. Thanks!