Created
November 22, 2012 19:15
-
-
Save fruchtose/4132590 to your computer and use it in GitHub Desktop.
Everyauth Meetup Java Analogue
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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