| 69 | /// @author Chen Fishbein |
| 70 | /// @deprecated Use [com.codename1.io.oidc.OidcClient] for new code. |
| 71 | @Deprecated |
| 72 | public class Oauth2 { |
| 73 | public static final String TOKEN = "access_token"; |
| 74 | private static String expires; |
| 75 | private static boolean backToParent = true; |
| 76 | private final String clientId; |
| 77 | private final String oauth2URL; |
| 78 | private boolean useRedirectForWeb = false; |
| 79 | private boolean useBrowserWindow = "true".equals(CN.getProperty("oauth2.useBrowserWindow", "true")); |
| 80 | private String token; |
| 81 | private String refreshToken; |
| 82 | private String identityToken; |
| 83 | private String redirectURI; |
| 84 | private String scope; |
| 85 | private String clientSecret; |
| 86 | private String tokenRequestURL; |
| 87 | private Hashtable additionalParams; |
| 88 | private Dialog login; |
| 89 | |
| 90 | /// Simple constructor |
| 91 | /// |
| 92 | /// #### Parameters |
| 93 | /// |
| 94 | /// - `oauth2URL`: the authentication url of the service |
| 95 | /// |
| 96 | /// - `clientId`: the client id that would like to use the service |
| 97 | /// |
| 98 | /// - `redirectURI`: the redirect uri |
| 99 | public Oauth2(String oauth2URL, String clientId, String redirectURI) { |
| 100 | this(oauth2URL, clientId, redirectURI, null, null, null); |
| 101 | } |
| 102 | |
| 103 | /// Simple constructor |
| 104 | /// |
| 105 | /// #### Parameters |
| 106 | /// |
| 107 | /// - `oauth2URL`: the authentication url of the service |
| 108 | /// |
| 109 | /// - `clientId`: the client id that would like to use the service |
| 110 | /// |
| 111 | /// - `redirectURI`: the redirect uri |
| 112 | /// |
| 113 | /// - `scope`: the authentication scope |
| 114 | public Oauth2(String oauth2URL, String clientId, String redirectURI, String scope) { |
| 115 | this(oauth2URL, clientId, redirectURI, scope, null, null); |
| 116 | } |
| 117 | |
| 118 | /// Simple constructor |
| 119 | /// |
| 120 | /// #### Parameters |
| 121 | /// |
| 122 | /// - `oauth2URL`: the authentication url of the service |
| 123 | /// |
| 124 | /// - `clientId`: the client id that would like to use the service |
| 125 | /// |
| 126 | /// - `redirectURI`: the redirect uri |
| 127 | /// |
| 128 | /// - `scope`: the authentication scope |
nothing calls this directly
no test coverage detected