com.github.scribejava.apis.GoogleApi20 Maven / Gradle / Ivy
package com.github.scribejava.apis;
import com.github.scribejava.apis.openid.OpenIdJsonTokenExtractor;
import com.github.scribejava.core.builder.api.DefaultApi20;
import com.github.scribejava.core.extractors.TokenExtractor;
import com.github.scribejava.core.model.OAuth2AccessToken;
public class GoogleApi20 extends DefaultApi20 {
protected GoogleApi20() {
}
private static class InstanceHolder {
private static final GoogleApi20 INSTANCE = new GoogleApi20();
}
public static GoogleApi20 instance() {
return InstanceHolder.INSTANCE;
}
@Override
public String getAccessTokenEndpoint() {
return "https://www.googleapis.com/oauth2/v4/token";
}
@Override
protected String getAuthorizationBaseUrl() {
return "https://accounts.google.com/o/oauth2/auth";
}
@Override
public TokenExtractor getAccessTokenExtractor() {
return OpenIdJsonTokenExtractor.instance();
}
@Override
public String getRevokeTokenEndpoint() {
return "https://accounts.google.com/o/oauth2/revoke";
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy