throws Exception {
AuthorizationCode code = new AuthorizationCode();
URI endpointUri = new URI("https://token.endpoint.uri/token");
URI redirectUri = new URI("https://arbitrary.redirect.uri/");
ClientID clientId = new ClientID("client");
Secret secret = new Secret("secret");
ClientSecretPost clientAuthentication = new ClientSecretPost(clientId,secret);
AuthorizationGrant grant = new AuthorizationCodeGrant(code,redirectUri);
TokenRequest request = new TokenRequest(endpointUri,clientAuthentication,grant);