1
0
mirror of synced 2026-07-31 23:37:02 +00:00

Add OAuth2AuthenticationException constructor that takes only OAuth2Error

Fixes gh-5374
This commit is contained in:
Joe Grandja
2018-05-29 21:10:34 -04:00
parent 48ef7c966d
commit 32c33d1def
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 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.
@@ -40,6 +40,15 @@ import org.springframework.util.Assert;
public class OAuth2AuthenticationException extends AuthenticationException {
private OAuth2Error error;
/**
* Constructs an {@code OAuth2AuthenticationException} using the provided parameters.
*
* @param error the {@link OAuth2Error OAuth 2.0 Error}
*/
public OAuth2AuthenticationException(OAuth2Error error) {
this(error, error.getDescription());
}
/**
* Constructs an {@code OAuth2AuthenticationException} using the provided parameters.
*