1
0
mirror of synced 2026-08-04 09:17:02 +00:00

Polish SessionIdChangedEvent

Add AbstractSessionEvent; clean up license headers and Javadocs

Fixes: gh-5438
This commit is contained in:
Eleftheria Stein
2020-03-06 12:04:49 -05:00
parent 5fc6414377
commit b2ea0ba775
6 changed files with 69 additions and 26 deletions
@@ -1,11 +1,11 @@
/*
* Copyright 2004, 2005, 2006 Acegi Technology Pty Limited
* Copyright 2002-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -16,33 +16,33 @@
package org.springframework.security.web.session;
import javax.servlet.http.HttpSession;
import org.springframework.security.core.session.SessionIdChangedEvent;
import javax.servlet.http.HttpSession;
/**
* Published by the {@link HttpSessionEventPublisher} when an {@code HttpSession} id
* is changed
* Published by the {@link HttpSessionEventPublisher} when an {@link HttpSession} ID
* is changed.
*
* @since 5.4
*/
public class HttpSessionIdChangedEvent extends SessionIdChangedEvent {
private final String oldSessionId;
private final String newSessionid;
// ~ Constructors
// ===================================================================================================
private final String newSessionId;
public HttpSessionIdChangedEvent(HttpSession session, String oldSessionId) {
super(session);
this.oldSessionId = oldSessionId;
this.newSessionid = session.getId();
this.newSessionId = session.getId();
}
@Override
public String getOldSessionId() {
return oldSessionId;
}
@Override
public String getNewSessionId() {
return newSessionid;
return newSessionId;
}
}