|
@@ -40,6 +40,10 @@ public class OneTimeTokenAuthenticationToken extends AbstractAuthenticationToken
|
|
|
|
|
|
private @Nullable String tokenValue;
|
|
|
|
|
|
+ /**
|
|
|
+ * @deprecated Please use constructor that takes a {@link String} instead
|
|
|
+ */
|
|
|
+ @Deprecated(forRemoval = true, since = "7.0")
|
|
|
public OneTimeTokenAuthenticationToken(@Nullable Object principal, String tokenValue) {
|
|
|
super(Collections.emptyList());
|
|
|
this.tokenValue = tokenValue;
|
|
@@ -50,6 +54,10 @@ public class OneTimeTokenAuthenticationToken extends AbstractAuthenticationToken
|
|
|
this(null, tokenValue);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * @deprecated Please use {@link OneTimeTokenAuthentication} instead
|
|
|
+ */
|
|
|
+ @Deprecated(forRemoval = true, since = "7.0")
|
|
|
public OneTimeTokenAuthenticationToken(Object principal, Collection<? extends GrantedAuthority> authorities) {
|
|
|
super(authorities);
|
|
|
this.principal = principal;
|
|
@@ -60,7 +68,9 @@ public class OneTimeTokenAuthenticationToken extends AbstractAuthenticationToken
|
|
|
* Creates an unauthenticated token
|
|
|
* @param tokenValue the one-time token value
|
|
|
* @return an unauthenticated {@link OneTimeTokenAuthenticationToken}
|
|
|
+ * @deprecated Please use constructor that takes a {@link String} instead
|
|
|
*/
|
|
|
+ @Deprecated(forRemoval = true, since = "7.0")
|
|
|
public static OneTimeTokenAuthenticationToken unauthenticated(String tokenValue) {
|
|
|
return new OneTimeTokenAuthenticationToken(null, tokenValue);
|
|
|
}
|
|
@@ -70,7 +80,9 @@ public class OneTimeTokenAuthenticationToken extends AbstractAuthenticationToken
|
|
|
* @param principal the principal
|
|
|
* @param tokenValue the one-time token value
|
|
|
* @return an unauthenticated {@link OneTimeTokenAuthenticationToken}
|
|
|
+ * @deprecated Please use constructor that takes a {@link String} instead
|
|
|
*/
|
|
|
+ @Deprecated(forRemoval = true, since = "7.0")
|
|
|
public static OneTimeTokenAuthenticationToken unauthenticated(Object principal, String tokenValue) {
|
|
|
return new OneTimeTokenAuthenticationToken(principal, tokenValue);
|
|
|
}
|
|
@@ -80,7 +92,9 @@ public class OneTimeTokenAuthenticationToken extends AbstractAuthenticationToken
|
|
|
* @param principal the principal
|
|
|
* @param authorities the principal authorities
|
|
|
* @return an authenticated {@link OneTimeTokenAuthenticationToken}
|
|
|
+ * @deprecated Please use {@link OneTimeTokenAuthentication} instead
|
|
|
*/
|
|
|
+ @Deprecated(forRemoval = true, since = "7.0")
|
|
|
public static OneTimeTokenAuthenticationToken authenticated(Object principal,
|
|
|
Collection<? extends GrantedAuthority> authorities) {
|
|
|
return new OneTimeTokenAuthenticationToken(principal, authorities);
|