Make DefaultOneTimeToken Serializable
Closes gh-16617 Signed-off-by: Max Batischev <mblancer@mail.ru>
This commit is contained in:
committed by
Josh Cummings
parent
7df85a2ed9
commit
fa35c5b4d8
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2024 the original author or authors.
|
||||
* Copyright 2002-2025 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.
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
package org.springframework.security.authentication.ott;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.time.Instant;
|
||||
|
||||
import org.springframework.util.Assert;
|
||||
@@ -28,6 +29,9 @@ import org.springframework.util.Assert;
|
||||
*/
|
||||
public class DefaultOneTimeToken implements OneTimeToken {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = -1545822943352278549L;
|
||||
|
||||
private final String token;
|
||||
|
||||
private final String username;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2024 the original author or authors.
|
||||
* Copyright 2002-2025 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.
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
package org.springframework.security.authentication.ott;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.Instant;
|
||||
|
||||
/**
|
||||
@@ -24,7 +25,7 @@ import java.time.Instant;
|
||||
* @author Marcus da Coregio
|
||||
* @since 6.4
|
||||
*/
|
||||
public interface OneTimeToken {
|
||||
public interface OneTimeToken extends Serializable {
|
||||
|
||||
/**
|
||||
* @return the one-time token value, never {@code null}
|
||||
|
||||
Reference in New Issue
Block a user