}
}
private OAuthParams getOAuthParams(HttpServletRequest req, String type, boolean login) throws OAuthException{
if(type.equals("google")){
oauthParams = new GoogleOAuthParams(req, login);
}else if(type.equals("github")){
oauthParams = new GitHubOAuthParams(req, login);
}else{
throw new OAuthException("No OAuth provider given");
}