Skip to content

Instantly share code, notes, and snippets.

@fruchtose
Created November 22, 2012 19:15
Show Gist options
  • Save fruchtose/4132590 to your computer and use it in GitHub Desktop.
Save fruchtose/4132590 to your computer and use it in GitHub Desktop.
Everyauth Meetup Java Analogue
import com.github.bnoguchi.everyauth.*;
import com.github.bnoguchi.everyauth.modules.OAuthSubmodule;
public class MeetupGetter {
public static final Submodule MEETUP;
static {
MEETUP = OAuthSubmodule.submodule("Meetup")
.setOAuthHost("https://secure.meetup.com")
.setAPIHost("https://api.meetup.com/2")
.setEveryPath("/auth/meetup")
.setCallbackPath("/auth/meetup/callback")
.setAuthPath("/oauth2/authorize")
.addAuthQueryParam("response_type", "code")
.setAccessTokenHttpMethod("post")
.setAccessTokenPath("/oauth2/access")
.setPostAccessTokenParamsLocation("data")
.addAccessTokenParam("grant_type", "authorization_code")
.setOAuthUserFetcher(new OAuthUserFetcher() {
Promise fetch(String accessToken) {
//...
}
})
.setExceptionConverter(new ExceptionConverter() {
Exception convert(Promise p) {
//...
}
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment