1 package org.springframework.security.oauth2.client.resource;
2
3 import java.util.Map;
4
5
6
7
8
9
10 @SuppressWarnings("serial")
11 public class UserRedirectRequiredException extends RuntimeException {
12
13 private final String redirectUri;
14
15 private final Map<String, String> requestParams;
16
17 private String stateKey;
18
19 private Object stateToPreserve;
20
21 public UserRedirectRequiredException(String redirectUri, Map<String, String> requestParams) {
22 super("A redirect is required to get the users approval");
23 this.redirectUri = redirectUri;
24 this.requestParams = requestParams;
25 }
26
27
28
29
30
31
32 public String getRedirectUri() {
33 return redirectUri;
34 }
35
36
37
38
39
40
41 public Map<String, String> getRequestParams() {
42 return requestParams;
43 }
44
45
46
47
48
49
50 public String getStateKey() {
51 return stateKey;
52 }
53
54
55
56
57
58
59 public void setStateKey(String stateKey) {
60 this.stateKey = stateKey;
61 }
62
63
64
65
66
67
68 public Object getStateToPreserve() {
69 return stateToPreserve;
70 }
71
72
73
74
75
76
77 public void setStateToPreserve(Object stateToPreserve) {
78 this.stateToPreserve = stateToPreserve;
79 }
80 }