@@ -17,14 +17,16 @@ public class OAuthConfig {
1717 private final OutputStream debugStream ;
1818 private final Integer connectTimeout ;
1919 private final Integer readTimeout ;
20- private String state ;
20+ private final String state ;
21+ private final String responseType ;
2122
2223 public OAuthConfig (String key , String secret ) {
23- this (key , secret , null , null , null , null , null , null , null );
24+ this (key , secret , null , null , null , null , null , null , null , null , null );
2425 }
2526
2627 public OAuthConfig (String key , String secret , String callback , SignatureType type , String scope ,
27- OutputStream stream , Integer connectTimeout , Integer readTimeout , String grantType ) {
28+ OutputStream stream , Integer connectTimeout , Integer readTimeout , String grantType , String state ,
29+ String responseType ) {
2830 this .apiKey = key ;
2931 this .apiSecret = secret ;
3032 this .callback = callback ;
@@ -34,6 +36,8 @@ public OAuthConfig(String key, String secret, String callback, SignatureType typ
3436 this .connectTimeout = connectTimeout ;
3537 this .readTimeout = readTimeout ;
3638 this .grantType = grantType ;
39+ this .state = state ;
40+ this .responseType = responseType ;
3741 }
3842
3943 public String getApiKey () {
@@ -87,17 +91,11 @@ public void log(String message) {
8791 }
8892 }
8993
90- /**
91- * Sets optional value used by some provider implementations that is exchanged with provider to avoid CSRF attacks.
92- *
93- * @param state some secret key that client side shall never receive
94- */
95- public void setState (String state ) {
96- this .state = state ;
97- }
98-
9994 public String getState () {
10095 return state ;
10196 }
10297
98+ public String getResponseType () {
99+ return responseType ;
100+ }
103101}
0 commit comments