I'm using the google API for OAuth token verification server-side. The imports are:
import com.google.api.client.googleapis.auth.oauth2.GoogleIdToken;
import com.google.api.client.googleapis.auth.oauth2.GoogleIdToken.Payload;
import com.google.api.client.googleapis.auth.oauth2.GoogleIdTokenVerifier;
And in my Maven pom.xml dependencies section:
    <dependency>
        <groupId>com.google.oauth-client</groupId>
        <artifactId>google-oauth-client</artifactId>
        <version>1.22.0</version>
    </dependency>
However, I'm getting
Cannot resolve symbol "googleapis"
When I check what packages are in com.google.api.client, I don't see googleapis either. However, these imports were taken straight from the example here
I figured it out - I just had to add the Google API client as well as the OAuth client. Here's what the dependencies look like in the pom.xml.
<!-- verify oauth tokens -->
        <dependency>
            <groupId>com.google.api-client</groupId>
            <artifactId>google-api-client</artifactId>
            <version>1.20.0</version>
        </dependency>
        <dependency>
            <groupId>com.google.oauth-client</groupId>
            <artifactId>google-oauth-client</artifactId>
            <version>1.22.0</version>
        </dependency>
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With