Skip to content

Commit dca7e03

Browse files
committed
Deprecate OAuth2AuthorizationResponseType.TOKEN
Closes gh-9582
1 parent eff4cdc commit dca7e03

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

oauth2/oauth2-core/src/main/java/org/springframework/security/oauth2/core/endpoint/OAuth2AuthorizationResponseType.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2017 the original author or authors.
2+
* Copyright 2002-2021 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -43,6 +43,15 @@ public final class OAuth2AuthorizationResponseType implements Serializable {
4343

4444
public static final OAuth2AuthorizationResponseType CODE = new OAuth2AuthorizationResponseType("code");
4545

46+
/**
47+
* It is not recommended to use the implicit flow due to the inherent risks of
48+
* returning access tokens in an HTTP redirect without any confirmation that it has
49+
* been received by the client.
50+
*
51+
* @see <a target="_blank" href="https://oauth.net/2/grant-types/implicit/">OAuth 2.0
52+
* Implicit Grant</a>
53+
*/
54+
@Deprecated
4655
public static final OAuth2AuthorizationResponseType TOKEN = new OAuth2AuthorizationResponseType("token");
4756

4857
private final String value;

0 commit comments

Comments
 (0)