Skip to content

Commit

Permalink
feat: support of 'none' type has been added in the list: response_typ…
Browse files Browse the repository at this point in the history
…es_supported;
  • Loading branch information
smansoft committed Nov 2, 2022
1 parent 6a386dd commit d7e9a28
Showing 1 changed file with 7 additions and 2 deletions.
Expand Up @@ -50,7 +50,12 @@ public enum ResponseType implements HasParamName, AttributeEnum {
* Include an ID Token in the authorization response.
*/
@JsonProperty("id_token")
ID_TOKEN("id_token", "ID Token");
ID_TOKEN("id_token", "ID Token"),
/**
* Don't use response at all
*/
@JsonProperty("none")
NONE("none", "NONE");

private final String value;
private final String displayName;
Expand Down Expand Up @@ -138,7 +143,7 @@ public static List<ResponseType> fromString(String paramList, String separator)
}

public static boolean isImplicitFlow(String responseTypes) {
return !responseTypes.contains("code") && (responseTypes.contains("id_token") || responseTypes.contains("token"));
return !responseTypes.contains("code") && !responseTypes.contains("none") && (responseTypes.contains("id_token") || responseTypes.contains("token"));
}

public static List<String> toStringList(List<ResponseType> responseTypes) {
Expand Down

0 comments on commit d7e9a28

Please sign in to comment.