我正在使用Google API进行OAuth令牌验证服务器端。进口是:
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;
在我的Maven pom.xml
依赖关系部分:
<dependency>
<groupId>com.google.oauth-client</groupId>
<artifactId>google-oauth-client</artifactId>
<version>1.22.0</version>
</dependency>
然而,我正在
无法解析符号&#34; googleapis&#34;
当我检查com.google.api.client
中包含哪些包时,我也看不到googleapis
。但是,这些导入直接来自示例here
答案 0 :(得分:0)
我明白了 - 我只需要添加Google API客户端以及OAuth客户端。以下是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>