Loading src/main/java/com/inteligr8/rs/OAuthAuthorizationFilter.java +8 −0 Original line number Diff line number Diff line Loading @@ -101,6 +101,7 @@ public abstract class OAuthAuthorizationFilter implements AuthorizationFilter { form.param("client_secret", this.clientSecret); if (this.scope != null) form.param("scope", this.scope); this.extendRefreshTokenForm(form); Entity<Form> entity = Entity.form(form); Loading @@ -118,6 +119,7 @@ public abstract class OAuthAuthorizationFilter implements AuthorizationFilter { this.accessToken = (String)response.get("access_token"); this.expiration = System.currentTimeMillis() + ((Number)response.get("expires_in")).longValue() * 1000L; this.refreshToken = (String)response.get("refresh_token"); this.extendRefreshTokenResponse(response); } protected Form createRefreshForm() { Loading @@ -127,4 +129,10 @@ public abstract class OAuthAuthorizationFilter implements AuthorizationFilter { protected abstract Form createForm(); protected void extendRefreshTokenForm(Form form) { } protected void extendRefreshTokenResponse(Map<String, Object> response) { } } Loading
src/main/java/com/inteligr8/rs/OAuthAuthorizationFilter.java +8 −0 Original line number Diff line number Diff line Loading @@ -101,6 +101,7 @@ public abstract class OAuthAuthorizationFilter implements AuthorizationFilter { form.param("client_secret", this.clientSecret); if (this.scope != null) form.param("scope", this.scope); this.extendRefreshTokenForm(form); Entity<Form> entity = Entity.form(form); Loading @@ -118,6 +119,7 @@ public abstract class OAuthAuthorizationFilter implements AuthorizationFilter { this.accessToken = (String)response.get("access_token"); this.expiration = System.currentTimeMillis() + ((Number)response.get("expires_in")).longValue() * 1000L; this.refreshToken = (String)response.get("refresh_token"); this.extendRefreshTokenResponse(response); } protected Form createRefreshForm() { Loading @@ -127,4 +129,10 @@ public abstract class OAuthAuthorizationFilter implements AuthorizationFilter { protected abstract Form createForm(); protected void extendRefreshTokenForm(Form form) { } protected void extendRefreshTokenResponse(Map<String, Object> response) { } }