-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make an expired cookie #177
base: main
Are you sure you want to change the base?
Conversation
.withCredentials(new ProfileCredentialsProvider("workflow")).build() | ||
|
||
val signingAndVerification: SigningAndVerification = | ||
PanDomainAuthSettingsRefresher("gutools.co.uk", "testing", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Joe, make sure you match gutools.co.uk
to the domain you got your cookie from, eg it may need to be code.dev-gutools.co.uk
class PanDomainAuthSettingsRefresherTest extends AnyFreeSpec with Matchers with EitherValues with OptionValues { | ||
|
||
"Give an expired cookie" in { | ||
val myRealCookie = ""// "Paste in your real cookie value here - from the 'gutoolsAuth-assym' cookie" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Get this from a browser session on a real gutools site.
val user: AuthenticatedUser = CookieUtils.parseCookieData(myRealCookie, signingAndVerification).value | ||
val expiredUser = user.copy(expires = Instant.now.minus(48, HOURS).toEpochMilli) | ||
val expiredCookieText = CookieUtils.generateCookieData(expiredUser, signingAndVerification) | ||
println(expiredCookieText) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expired cookie output here.
No description provided.