@Test public void testProxy() throws Exception { BearerOAuth2Proxy auth2Proxy = BearerOAuth2Proxy.popOAuth2Proxy(component.getContext()); assertNotNull(auth2Proxy); CoreToken refreshToken = realm.getTokenStore().createRefreshToken(OAuth2Utils.split("read write", null), "test", "admin", "cid", null, OAuth2Constants.Params.REFRESH_TOKEN); BearerToken token = auth2Proxy.flowRefreshToken(refreshToken.getTokenID()); assertNotNull(token); }
private CoreToken createRefreshToken(CoreToken refreshToken) { return getTokenStore().createRefreshToken(refreshToken.getScope(), OAuth2Utils.getRealm(getRequest()), refreshToken.getUserID(), refreshToken.getClientID(), refreshToken.getRedirectURI(), refreshToken.getGrantType()); }
RefreshTokenServerResource extends AbstractFlow { private CoreToken createRefreshToken(CoreToken refreshToken) { return getTokenStore().createRefreshToken(refreshToken.getScope(), OAuth2Utils.getRealm(getRequest()), refreshToken.getUserID(), refreshToken.getClientID(), refreshToken.getRedirectURI(), refreshToken.getGrantType()); } }
RefreshTokenServerResource extends AbstractFlow { private CoreToken createRefreshToken(CoreToken refreshToken) { return getTokenStore().createRefreshToken(refreshToken.getScope(), OAuth2Utils.getRealm(getRequest()), refreshToken.getUserID(), refreshToken.getClientID(), refreshToken.getRedirectURI(), refreshToken.getGrantType()); }  }
RefreshTokenServerResource extends AbstractFlow { private CoreToken createRefreshToken(CoreToken refreshToken) { return getTokenStore().createRefreshToken(refreshToken.getScope(), OAuth2Utils.getRealm(getRequest()), refreshToken.getUserID(), refreshToken.getClientID(), refreshToken.getRedirectURI(), refreshToken.getGrantType()); }  @Post("form:json") Representation represent(Representation entity); }
RefreshTokenServerResource extends AbstractFlow { private CoreToken createRefreshToken(CoreToken refreshToken) { return getTokenStore().createRefreshToken(refreshToken.getScope(), OAuth2Utils.getRealm(getRequest()), refreshToken.getUserID(), refreshToken.getClientID(), refreshToken.getRedirectURI(), refreshToken.getGrantType()); }  @Post("form:json") Representation represent(Representation entity);  }