import org.pac4j.core.config.Config; import org.pac4j.oauth.client.Google2Client; import org.pac4j.oauth.credentials.OAuthCredentials; public class App { public static void main(String[] args) { Google2Client googleClient = new Google2Client("clientId", "clientSecret"); googleClient.setScope("email"); Config config = new Config("http://localhost:8080/callback", googleClient); config.setLogoutUrl("/logout"); config.setAfterLogoutUrl("/login"); OAuthCredentials credentials = new OAuthCredentials("accessToken", "clientId", "clientSecret"); // ... } }


上一篇:
下一篇:
切换中文