Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

migrate code from googleapis/java-recaptchaenterprise #7417

Merged
merged 196 commits into from
Nov 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
196 commits
Select commit Hold shift + click to select a range
73455ca
samples: scaffold pom.xml files (#79)
yoshi-automation Mar 17, 2020
e78f84b
chore(deps): update dependency com.google.cloud:libraries-bom to v4.3…
renovate-bot Mar 23, 2020
d864fce
chore(deps): update dependency com.google.cloud.samples:shared-config…
renovate-bot Mar 25, 2020
082652a
chore(deps): update dependency com.google.cloud.samples:shared-config…
renovate-bot Mar 30, 2020
fd195a0
chore(deps): update dependency com.google.cloud:libraries-bom to v4.4…
renovate-bot Apr 1, 2020
dbc29fb
chore(deps): update dependency com.google.cloud.samples:shared-config…
renovate-bot Apr 6, 2020
9ab8472
chore(deps): update dependency com.google.cloud:libraries-bom to v4.4…
renovate-bot Apr 6, 2020
b0f4ca1
chore(deps): update dependency com.google.cloud:libraries-bom to v5 (…
renovate-bot Apr 14, 2020
ef6ac4f
chore(deps): update dependency com.google.cloud.samples:shared-config…
renovate-bot Apr 16, 2020
6af940b
chore(deps): update dependency com.google.cloud.samples:shared-config…
renovate-bot Apr 17, 2020
8017f72
chore: fix samples snippet names, name in repo-metadata (#119)
chingor13 Apr 20, 2020
a036494
chore(deps): update dependency com.google.cloud:libraries-bom to v5.2…
renovate-bot Apr 23, 2020
bf1d41c
chore(deps): update dependency com.google.cloud:libraries-bom to v5.3…
renovate-bot Apr 28, 2020
f30be44
chore(deps): update dependency com.google.cloud:libraries-bom to v5.4…
renovate-bot May 19, 2020
d7ed5c0
chore(deps): update dependency com.google.cloud:libraries-bom to v5.5…
renovate-bot May 29, 2020
c58e6ea
chore(deps): update dependency com.google.cloud.samples:shared-config…
renovate-bot Jun 10, 2020
ab47e62
chore(deps): update dependency com.google.cloud:libraries-bom to v5.7…
renovate-bot Jun 10, 2020
6f64aed
chore(deps): update dependency com.google.cloud:libraries-bom to v6 (…
renovate-bot Jun 16, 2020
9df41f1
chore(deps): update dependency com.google.cloud:libraries-bom to v7 (…
renovate-bot Jun 17, 2020
5c44bb5
chore(deps): update dependency com.google.cloud:libraries-bom to v7.0…
renovate-bot Jun 22, 2020
a7988d5
chore(deps): update dependency com.google.cloud:libraries-bom to v8 (…
renovate-bot Jun 26, 2020
846898c
chore(deps): update dependency com.google.cloud:libraries-bom to v8.1…
renovate-bot Jul 16, 2020
e776829
chore(deps): update dependency com.google.cloud:libraries-bom to v9
renovate-bot Aug 14, 2020
a3fa4ad
chore(deps): update dependency com.google.cloud:libraries-bom to v9.1.0
renovate-bot Aug 17, 2020
fbdfb5e
chore(deps): update dependency com.google.cloud:libraries-bom to v10
renovate-bot Sep 10, 2020
d2ac31b
chore(deps): update dependency com.google.cloud:libraries-bom to v11
renovate-bot Sep 24, 2020
761f1cd
chore(deps): update dependency com.google.cloud.samples:shared-config…
renovate-bot Oct 2, 2020
c056ac8
chore(deps): update dependency com.google.cloud:libraries-bom to v12 …
renovate-bot Oct 6, 2020
ca57b1f
chore(deps): update dependency com.google.cloud:libraries-bom to v12.…
renovate-bot Oct 15, 2020
0683641
test(deps): update dependency junit:junit to v4.13.1 (#249)
renovate-bot Oct 19, 2020
5ec06a1
chore(deps): update dependency com.google.cloud:libraries-bom to v13 …
renovate-bot Oct 20, 2020
c68917f
chore(deps): update dependency com.google.cloud:libraries-bom to v13.…
renovate-bot Oct 21, 2020
c8e410c
test(deps): update dependency com.google.truth:truth to v1.1 (#264)
renovate-bot Oct 22, 2020
3e70081
chore(deps): update dependency com.google.cloud:libraries-bom to v13.…
renovate-bot Oct 23, 2020
834ceb3
chore(deps): update dependency com.google.cloud:libraries-bom to v13.…
renovate-bot Oct 26, 2020
f80f66e
test(deps): update dependency junit:junit to v4 (#272)
renovate-bot Oct 27, 2020
d75d51b
chore(deps): update dependency com.google.cloud:libraries-bom to v13.…
renovate-bot Oct 30, 2020
1944215
chore(deps): update dependency com.google.cloud:libraries-bom to v14 …
renovate-bot Nov 4, 2020
62343ab
chore(deps): update dependency com.google.cloud:libraries-bom to v15 …
renovate-bot Nov 5, 2020
510a0c9
chore(deps): update dependency com.google.cloud:libraries-bom to v15.…
renovate-bot Nov 12, 2020
1f65f0f
chore(deps): update dependency com.google.cloud:libraries-bom to v16 …
renovate-bot Nov 19, 2020
af19550
chore(deps): update dependency com.google.cloud:libraries-bom to v16.…
renovate-bot Dec 15, 2020
a209ac3
chore(deps): update dependency com.google.cloud:libraries-bom to v16.…
renovate-bot Jan 7, 2021
e2e7f1f
test(deps): update dependency com.google.truth:truth to v1.1.2 (#345)
renovate-bot Jan 25, 2021
a060ba0
chore(deps): update dependency com.google.cloud:libraries-bom to v16.…
renovate-bot Feb 10, 2021
1daba0c
test(deps): update dependency junit:junit to v4.13.2 (#363)
renovate-bot Feb 22, 2021
78b8e84
chore(deps): update dependency com.google.cloud:libraries-bom to v17 …
renovate-bot Feb 24, 2021
729b290
chore(deps): update dependency com.google.cloud:libraries-bom to v18 …
renovate-bot Feb 25, 2021
209ab52
chore(deps): update dependency com.google.cloud:libraries-bom to v18.…
renovate-bot Mar 3, 2021
5d8462d
chore(deps): update dependency com.google.cloud:libraries-bom to v19 …
renovate-bot Mar 4, 2021
37bac71
chore(deps): update dependency com.google.cloud:libraries-bom to v19.…
renovate-bot Mar 17, 2021
8994464
chore(deps): update dependency com.google.cloud:libraries-bom to v19.…
renovate-bot Mar 29, 2021
736b4b9
chore(deps): update dependency com.google.cloud.samples:shared-config…
renovate-bot Apr 9, 2021
6602f1d
chore(deps): update dependency com.google.cloud:libraries-bom to v20 …
renovate-bot Apr 12, 2021
d7f87a0
chore(deps): update dependency com.google.cloud:libraries-bom to v20.…
renovate-bot Apr 19, 2021
dfc0ed5
chore(deps): update dependency com.google.cloud:libraries-bom to v20.…
renovate-bot Apr 29, 2021
242c405
chore(deps): update dependency com.google.cloud:libraries-bom to v20.…
renovate-bot May 13, 2021
8676b43
chore(deps): update dependency com.google.cloud:libraries-bom to v20.…
renovate-bot May 17, 2021
6abf04a
chore(deps): update dependency com.google.cloud:libraries-bom to v20.…
renovate-bot May 25, 2021
329aaa0
test(deps): update dependency com.google.truth:truth to v1.1.3 (#461)
renovate-bot May 26, 2021
6a94441
chore(deps): update dependency com.google.cloud:libraries-bom to v20.…
renovate-bot Jun 7, 2021
60dd262
chore(deps): update dependency com.google.cloud.samples:shared-config…
renovate-bot Jun 7, 2021
b5d967a
chore(deps): update dependency com.google.cloud:libraries-bom to v20.…
renovate-bot Jun 23, 2021
82c17c8
chore(deps): update dependency com.google.cloud:libraries-bom to v20.…
renovate-bot Jul 9, 2021
aef4a78
chore(deps): update dependency com.google.cloud:libraries-bom to v20.…
renovate-bot Jul 28, 2021
f93c18a
chore(deps): update dependency com.google.cloud:libraries-bom to v21 …
renovate-bot Aug 19, 2021
9c6acfe
chore(deps): update dependency com.google.cloud:libraries-bom to v22 …
renovate-bot Aug 27, 2021
e56a11f
docs(samples): create recaptcha samples (#535)
Sita04 Aug 27, 2021
f89e70d
chore: regenerate README (#541)
yoshi-automation Aug 27, 2021
4f8bb86
deps: update dependency io.github.bonigarcia:webdrivermanager to v5 (…
renovate-bot Aug 31, 2021
bfaff39
deps: update dependency com.google.guava:guava to v30 (#550)
renovate-bot Aug 31, 2021
887e333
deps: update dependency org.seleniumhq.selenium:selenium-java to v3.1…
renovate-bot Aug 31, 2021
2b520b7
deps: update dependency org.seleniumhq.selenium:selenium-chrome-drive…
renovate-bot Aug 31, 2021
1c86bdc
deps: update dependency net.bytebuddy:byte-buddy to v1.11.14 (#547)
renovate-bot Aug 31, 2021
86d1e6f
deps: update dependency org.springframework.boot:spring-boot-starter-…
renovate-bot Aug 31, 2021
9af8c60
deps: update dependency org.springframework.boot:spring-boot-starter-…
renovate-bot Aug 31, 2021
d1087e3
deps: update dependency org.springframework.boot:spring-boot-starter-…
renovate-bot Sep 1, 2021
1962367
docs(samples): adding README.md (#557)
Sita04 Sep 3, 2021
b1f0fa3
chore(deps): update dependency com.google.cloud:libraries-bom to v23 …
renovate-bot Sep 13, 2021
827aaa3
deps: update dependency io.github.bonigarcia:webdrivermanager to v5.0…
renovate-bot Sep 14, 2021
286ef6d
deps: update dependency net.bytebuddy:byte-buddy to v1.11.15 (#555)
renovate-bot Sep 14, 2021
72dc17b
deps: update dependency io.github.bonigarcia:webdrivermanager to v5.0…
renovate-bot Sep 20, 2021
46b2945
deps: update dependency net.bytebuddy:byte-buddy to v1.11.16 (#575)
renovate-bot Sep 20, 2021
480bab0
deps: update dependency net.bytebuddy:byte-buddy to v1.11.17 (#580)
renovate-bot Sep 22, 2021
1d7cbf6
deps: update dependency net.bytebuddy:byte-buddy to v1.11.18 (#581)
renovate-bot Sep 22, 2021
b703692
deps: update dependency org.springframework.boot:spring-boot-starter-…
renovate-bot Sep 23, 2021
388a44f
deps: update dependency org.springframework.boot:spring-boot-starter-…
renovate-bot Sep 23, 2021
ce78fec
deps: update dependency org.springframework.boot:spring-boot-starter-…
renovate-bot Sep 23, 2021
0ce601d
deps: update dependency com.google.guava:guava to v31 (#587)
renovate-bot Sep 27, 2021
68c5a3c
chore(deps): update dependency com.google.cloud:libraries-bom to v23.…
renovate-bot Oct 1, 2021
dec8a82
deps: update dependency net.bytebuddy:byte-buddy to v1.11.19 (#595)
renovate-bot Oct 5, 2021
c6a7cd6
deps: update dependency net.bytebuddy:byte-buddy to v1.11.20 (#600)
renovate-bot Oct 11, 2021
decbbcd
deps: update dependency org.springframework.boot:spring-boot-starter-…
renovate-bot Oct 25, 2021
f29e63e
deps: update dependency org.springframework.boot:spring-boot-starter-…
renovate-bot Oct 25, 2021
aee0fb5
deps: update dependency org.springframework.boot:spring-boot-starter-…
renovate-bot Oct 25, 2021
99b8f4a
deps: update dependency net.bytebuddy:byte-buddy to v1.11.21 (#609)
renovate-bot Oct 26, 2021
55dac83
deps: update dependency org.seleniumhq.selenium:selenium-java to v4 (…
renovate-bot Oct 26, 2021
c005fe9
deps: update dependency org.seleniumhq.selenium:selenium-chrome-drive…
renovate-bot Oct 26, 2021
663cfbd
chore(deps): update dependency com.google.cloud:libraries-bom to v24 …
renovate-bot Oct 27, 2021
51916bb
deps: update dependency net.bytebuddy:byte-buddy to v1.11.22 (#621)
renovate-bot Nov 3, 2021
916bce8
docs(samples): removed assessment name (#623)
Sita04 Nov 8, 2021
a964b53
deps: update dependency net.bytebuddy:byte-buddy to v1.12.0 (#625)
renovate-bot Nov 8, 2021
f998d97
docs(samples): added annotate assessment sample and refactored tests.…
Sita04 Nov 10, 2021
5a27e03
deps: update dependency net.bytebuddy:byte-buddy to v1.12.1 (#632)
renovate-bot Nov 10, 2021
e468e7a
deps: update dependency org.springframework.boot:spring-boot-starter-…
renovate-bot Nov 19, 2021
cbb08b1
deps: update dependency org.springframework.boot:spring-boot-starter-…
renovate-bot Nov 19, 2021
ba9b341
deps: update dependency org.springframework.boot:spring-boot-starter-…
renovate-bot Nov 19, 2021
d2fbdd1
deps: update dependency org.seleniumhq.selenium:selenium-java to v4.1…
renovate-bot Nov 23, 2021
e9becb8
deps: update dependency org.seleniumhq.selenium:selenium-chrome-drive…
renovate-bot Nov 23, 2021
3fc4feb
deps: update dependency net.bytebuddy:byte-buddy to v1.12.2 (#648)
renovate-bot Nov 24, 2021
2bbf954
docs(samples): updated comments in create assessment (#641)
Sita04 Nov 24, 2021
feb5634
chore: byte-buddy in sample is unused. (#656)
suztomo Dec 2, 2021
99db8c5
deps: update dependency org.springframework.boot:spring-boot-starter-…
renovate-bot Dec 6, 2021
6bbe1de
chore(deps): update dependency com.google.cloud.samples:shared-config…
renovate-bot Dec 6, 2021
6225954
deps: update dependency org.springframework.boot:spring-boot-starter-…
renovate-bot Dec 7, 2021
4147a26
deps: update dependency org.springframework.boot:spring-boot-starter-…
renovate-bot Dec 7, 2021
5cd51b4
docs(samples): added samples and test for recaptcha key operations (#…
Sita04 Dec 7, 2021
b8da1aa
chore(deps): update dependency com.google.cloud:libraries-bom to v24.…
renovate-bot Dec 28, 2021
bc46775
deps: update dependency org.springframework.boot:spring-boot-starter-…
renovate-bot Jan 19, 2022
252cdc9
deps: update dependency org.springframework.boot:spring-boot-starter-…
renovate-bot Jan 19, 2022
23b7981
deps: update dependency org.springframework.boot:spring-boot-starter-…
renovate-bot Jan 19, 2022
b7ee5f1
deps: update dependency org.seleniumhq.selenium:selenium-chrome-drive…
renovate-bot Jan 19, 2022
681a3e8
chore(deps): update dependency com.google.cloud:libraries-bom to v24.…
renovate-bot Jan 19, 2022
c85c634
deps: update dependency org.seleniumhq.selenium:selenium-java to v4.1…
renovate-bot Jan 19, 2022
aef64f1
chore(deps): update dependency com.google.cloud:libraries-bom to v24.…
renovate-bot Jan 19, 2022
5ec6bb5
deps: update dependency org.springframework.boot:spring-boot-starter-…
renovate-bot Jan 21, 2022
7011d51
deps: update dependency org.springframework.boot:spring-boot-starter-…
renovate-bot Jan 21, 2022
e321932
deps: update dependency org.springframework.boot:spring-boot-starter-…
renovate-bot Jan 25, 2022
b8f472a
deps: update dependency org.seleniumhq.selenium:selenium-java to v4.1…
renovate-bot Feb 2, 2022
08cdaa7
deps: update dependency org.seleniumhq.selenium:selenium-chrome-drive…
renovate-bot Feb 2, 2022
6fc5a5b
chore(deps): update dependency com.google.cloud:libraries-bom to v24.…
renovate-bot Feb 8, 2022
c7e3ada
deps: update dependency io.github.bonigarcia:webdrivermanager to v5.1…
renovate-bot Feb 18, 2022
4f78e24
deps: update dependency org.springframework.boot:spring-boot-starter-…
renovate-bot Feb 28, 2022
8778241
deps: update dependency org.springframework.boot:spring-boot-starter-…
renovate-bot Feb 28, 2022
687d1ba
deps: update dependency org.springframework.boot:spring-boot-starter-…
renovate-bot Feb 28, 2022
7dda427
deps: update dependency com.google.guava:guava to v31.1-jre (#725)
renovate-bot Mar 1, 2022
b025264
chore(deps): update dependency com.google.cloud:libraries-bom to v25 …
renovate-bot Mar 14, 2022
db513e4
deps: update dependency org.springframework.boot:spring-boot-starter-…
renovate-bot Mar 24, 2022
2295778
deps: update dependency org.springframework.boot:spring-boot-starter-…
renovate-bot Mar 24, 2022
5e9c74c
deps: update dependency org.springframework.boot:spring-boot-starter-…
renovate-bot Mar 25, 2022
af880ed
chore(deps): update dependency com.google.cloud:libraries-bom to v25.…
renovate-bot Apr 1, 2022
4a0d7a6
deps: update dependency org.seleniumhq.selenium:selenium-chrome-drive…
renovate-bot Apr 4, 2022
8da9538
deps: update dependency org.seleniumhq.selenium:selenium-java to v4.1…
renovate-bot Apr 4, 2022
4a16d1b
deps: update dependency org.springframework.boot:spring-boot-starter-…
renovate-bot Apr 6, 2022
79893c7
deps: update dependency org.springframework.boot:spring-boot-starter-…
renovate-bot Apr 6, 2022
42858dc
deps: update dependency org.springframework.boot:spring-boot-starter-…
renovate-bot Apr 6, 2022
5c41024
deps: update dependency io.github.bonigarcia:webdrivermanager to v5.1…
renovate-bot Apr 11, 2022
ac8b77b
deps: update dependency org.springframework.boot:spring-boot-starter-…
renovate-bot Apr 21, 2022
904257d
deps: update dependency org.springframework.boot:spring-boot-starter-…
renovate-bot Apr 21, 2022
de57cab
deps: update dependency org.springframework.boot:spring-boot-starter-…
renovate-bot Apr 21, 2022
102e79f
chore(deps): update dependency com.google.cloud:libraries-bom to v25.…
renovate-bot Apr 27, 2022
9d9ed2f
deps: update dependency org.seleniumhq.selenium:selenium-chrome-drive…
renovate-bot May 4, 2022
d17051f
deps: update dependency org.seleniumhq.selenium:selenium-java to v4.1…
renovate-bot May 4, 2022
edc26d7
chore(deps): update dependency com.google.cloud:libraries-bom to v25.…
renovate-bot May 16, 2022
ebe1d7d
docs(samples): added account defender samples and tests (#771)
Sita04 May 16, 2022
3432657
deps: update dependency org.springframework.boot:spring-boot-starter-…
renovate-bot May 19, 2022
3c31b35
deps: update dependency org.springframework.boot:spring-boot-starter-…
renovate-bot May 19, 2022
88bb8e9
deps: update dependency org.springframework.boot:spring-boot-starter-…
renovate-bot May 19, 2022
355e965
deps: update dependency io.github.bonigarcia:webdrivermanager to v5.2…
renovate-bot May 25, 2022
918e242
chore(deps): update dependency com.google.cloud:libraries-bom to v25.…
renovate-bot Jun 6, 2022
6048414
deps: update dependency org.seleniumhq.selenium:selenium-chrome-drive…
renovate-bot Jun 6, 2022
035b611
deps: update dependency org.seleniumhq.selenium:selenium-java to v4.2…
renovate-bot Jun 6, 2022
30fba87
docs(samples): add password leak sample and test (#808)
Sita04 Jun 9, 2022
9c33b3c
deps: update dependency org.seleniumhq.selenium:selenium-java to v4.2…
renovate-bot Jun 13, 2022
408e965
deps: update dependency org.seleniumhq.selenium:selenium-chrome-drive…
renovate-bot Jun 13, 2022
ee676ec
deps: update dependency org.seleniumhq.selenium:selenium-java to v4.3…
renovate-bot Jun 24, 2022
8b7e6dd
deps: update dependency org.seleniumhq.selenium:selenium-chrome-drive…
renovate-bot Jun 24, 2022
459630b
deps: update dependency org.springframework.boot:spring-boot-starter-…
renovate-bot Jun 24, 2022
c474e9f
deps: update dependency org.springframework.boot:spring-boot-starter-…
renovate-bot Jun 24, 2022
815c2db
deps: update dependency org.springframework.boot:spring-boot-starter-…
renovate-bot Jun 24, 2022
b80fac7
deps: update dependency io.github.bonigarcia:webdrivermanager to v5.2…
renovate-bot Jun 27, 2022
810120d
chore(deps): update dependency com.google.cloud:libraries-bom to v26 …
renovate-bot Jul 13, 2022
88cdea5
deps: update dependency org.springframework.boot:spring-boot-starter-…
renovate-bot Jul 21, 2022
f3945aa
deps: update dependency org.springframework.boot:spring-boot-starter-…
renovate-bot Jul 21, 2022
55e854f
deps: update dependency org.springframework.boot:spring-boot-starter-…
renovate-bot Jul 21, 2022
1181787
deps: update dependency io.github.bonigarcia:webdrivermanager to v5.2…
renovate-bot Jul 29, 2022
5620662
deps: update dependency io.github.bonigarcia:webdrivermanager to v5.2…
renovate-bot Aug 3, 2022
fa4b611
chore(deps): update dependency com.google.cloud:libraries-bom to v26.…
renovate-bot Aug 16, 2022
7eb7529
deps: update dependency org.seleniumhq.selenium:selenium-java to v4.4…
renovate-bot Aug 16, 2022
3a7432d
deps: update dependency org.seleniumhq.selenium:selenium-chrome-drive…
renovate-bot Aug 16, 2022
23513ee
deps: update dependency org.springframework.boot:spring-boot-starter-…
renovate-bot Aug 19, 2022
870e804
deps: update dependency org.springframework.boot:spring-boot-starter-…
renovate-bot Aug 19, 2022
63c6ab4
deps: update dependency org.springframework.boot:spring-boot-starter-…
renovate-bot Aug 19, 2022
e3c96e5
deps: update dependency io.github.bonigarcia:webdrivermanager to v5.3…
renovate-bot Aug 22, 2022
0f0f6d4
chore(deps): update dependency com.google.cloud:libraries-bom to v26.…
renovate-bot Aug 31, 2022
b7bd11b
chore(deps): update dependency com.google.cloud:libraries-bom to v26.…
renovate-bot Sep 20, 2022
7752acf
deps: update dependency org.springframework.boot:spring-boot-starter-…
renovate-bot Sep 22, 2022
77ced9e
deps: update dependency org.springframework.boot:spring-boot-starter-…
renovate-bot Sep 22, 2022
3ef7a0f
deps: update dependency org.springframework.boot:spring-boot-starter-…
renovate-bot Sep 22, 2022
9c69068
deps: update dependency org.seleniumhq.selenium:selenium-chrome-drive…
renovate-bot Sep 28, 2022
b650ef4
deps: update dependency org.seleniumhq.selenium:selenium-java to v4.5…
renovate-bot Sep 30, 2022
44e7a2d
chore(deps): update dependency com.google.cloud:libraries-bom to v26.…
renovate-bot Oct 7, 2022
fcfd0ab
chore(deps): update dependency com.google.cloud:libraries-bom to v26.…
renovate-bot Nov 8, 2022
d89d525
Merge remote-tracking branch 'migration/main' into java-recaptchaente…
Sita04 Nov 11, 2022
13f3647
updated pom xml
Sita04 Nov 11, 2022
f6f2b70
restructured files
Sita04 Nov 12, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions recaptcha_enterprise/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<?xml version='1.0' encoding='UTF-8'?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.google.cloud</groupId>
<artifactId>recaptcha-enterprise-snippets</artifactId>
<packaging>jar</packaging>
<name>Google reCAPTCHA Enterprise Snippets</name>
<url>https://github.com/googleapis/java-recaptchaenterprise</url>

<!--
The parent pom defines common style checks and testing strategies for our samples.
Removing or replacing it should not affect the execution of the samples in anyway.
-->
<parent>
<groupId>com.google.cloud.samples</groupId>
<artifactId>shared-configuration</artifactId>
<version>1.2.0</version>
</parent>

<properties>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>


<!-- [START recaptcha_enterprise_install_with_bom] -->
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>libraries-bom</artifactId>
<version>26.1.4</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-recaptchaenterprise</artifactId>
</dependency>
<!-- [START_EXCLUDE] -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.truth</groupId>
<artifactId>truth</artifactId>
<version>1.1.3</version>
<scope>test</scope>
</dependency>
<!-- [END_EXCLUDE] -->
</dependencies>
<!-- [END recaptcha_enterprise_install_with_bom] -->
</project>
28 changes: 28 additions & 0 deletions recaptcha_enterprise/snippets/src/main/java/app/Main.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package app;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class Main {

public static void main(String[] args) {
SpringApplication.run(Main.class, args);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
* Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package app;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;

@Controller
@RequestMapping
public class MainController {

@GetMapping(value = "/")
public static ModelAndView landingPage(
@RequestParam("recaptchaSiteKey") String recaptchaSiteKey) {
ModelMap map = new ModelAndView().getModelMap();
map.put("siteKey", recaptchaSiteKey);
return new ModelAndView("index", map);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
/*
* Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package recaptcha;

// [START recaptcha_enterprise_annotate_assessment]

import com.google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseServiceClient;
import com.google.recaptchaenterprise.v1.AnnotateAssessmentRequest;
import com.google.recaptchaenterprise.v1.AnnotateAssessmentRequest.Annotation;
import com.google.recaptchaenterprise.v1.AnnotateAssessmentRequest.Reason;
import com.google.recaptchaenterprise.v1.AnnotateAssessmentResponse;
import com.google.recaptchaenterprise.v1.AssessmentName;
import java.io.IOException;

public class AnnotateAssessment {

public static void main(String[] args) throws IOException {
// TODO(developer): Replace these variables before running the sample.
String projectID = "project-id";
String assessmentId = "assessment-id";
annotateAssessment(projectID, assessmentId);
}

/**
* Pre-requisite: Create an assessment before annotating.
*
* <p>Annotate an assessment to provide feedback on the correctness of recaptcha prediction.
*
* @param projectID: GCloud Project id
* @param assessmentId: Value of the 'name' field returned from the CreateAssessment call.
*/
public static void annotateAssessment(String projectID, String assessmentId) throws IOException {
// Initialize client that will be used to send requests. This client only needs to be created
// once, and can be reused for multiple requests. After completing all of your requests, call
// the `client.close()` method on the client to safely
// clean up any remaining background resources.
try (RecaptchaEnterpriseServiceClient client = RecaptchaEnterpriseServiceClient.create()) {
// Build the annotation request.
// For more info on when/how to annotate, see:
// https://cloud.google.com/recaptcha-enterprise/docs/annotate-assessment#when_to_annotate
AnnotateAssessmentRequest annotateAssessmentRequest =
AnnotateAssessmentRequest.newBuilder()
.setName(AssessmentName.of(projectID, assessmentId).toString())
.setAnnotation(Annotation.FRAUDULENT)
.addReasons(Reason.FAILED_TWO_FACTOR)
.build();

// Empty response is sent back.
AnnotateAssessmentResponse response = client.annotateAssessment(annotateAssessmentRequest);
System.out.println("Annotated response sent successfully ! " + response);
}
}
}
// [END recaptcha_enterprise_annotate_assessment]
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
/*
* Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package recaptcha;

// [START recaptcha_enterprise_create_assessment]

import com.google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseServiceClient;
import com.google.recaptchaenterprise.v1.Assessment;
import com.google.recaptchaenterprise.v1.CreateAssessmentRequest;
import com.google.recaptchaenterprise.v1.Event;
import com.google.recaptchaenterprise.v1.ProjectName;
import com.google.recaptchaenterprise.v1.RiskAnalysis.ClassificationReason;
import java.io.IOException;

public class CreateAssessment {

public static void main(String[] args) throws IOException {
// TODO(developer): Replace these variables before running the sample.
String projectID = "project-id";
String recaptchaSiteKey = "recaptcha-site-key";
String token = "action-token";
String recaptchaAction = "action-name";

createAssessment(projectID, recaptchaSiteKey, token, recaptchaAction);
}

/**
* Create an assessment to analyze the risk of an UI action. Assessment approach is the same for
* both 'score' and 'checkbox' type recaptcha site keys.
*
* @param projectID : GCloud Project ID
* @param recaptchaSiteKey : Site key obtained by registering a domain/app to use recaptcha
* services. (score/ checkbox type)
* @param token : The token obtained from the client on passing the recaptchaSiteKey.
* @param recaptchaAction : Action name corresponding to the token.
*/
public static void createAssessment(
String projectID, String recaptchaSiteKey, String token, String recaptchaAction)
throws IOException {
// Initialize client that will be used to send requests. This client only needs to be created
// once, and can be reused for multiple requests. After completing all of your requests, call
// the `client.close()` method on the client to safely
// clean up any remaining background resources.
try (RecaptchaEnterpriseServiceClient client = RecaptchaEnterpriseServiceClient.create()) {

// Set the properties of the event to be tracked.
Event event = Event.newBuilder().setSiteKey(recaptchaSiteKey).setToken(token).build();

// Build the assessment request.
CreateAssessmentRequest createAssessmentRequest =
CreateAssessmentRequest.newBuilder()
.setParent(ProjectName.of(projectID).toString())
.setAssessment(Assessment.newBuilder().setEvent(event).build())
.build();

Assessment response = client.createAssessment(createAssessmentRequest);

// Check if the token is valid.
if (!response.getTokenProperties().getValid()) {
System.out.println(
"The CreateAssessment call failed because the token was: "
+ response.getTokenProperties().getInvalidReason().name());
return;
}

// Check if the expected action was executed.
// (If the key is checkbox type and 'action' attribute wasn't set, skip this check.)
if (!response.getTokenProperties().getAction().equals(recaptchaAction)) {
System.out.println(
"The action attribute in reCAPTCHA tag is: "
+ response.getTokenProperties().getAction());
System.out.println(
"The action attribute in the reCAPTCHA tag "
+ "does not match the action ("
+ recaptchaAction
+ ") you are expecting to score");
return;
}

// Get the reason(s) and the risk score.
// For more information on interpreting the assessment,
// see: https://cloud.google.com/recaptcha-enterprise/docs/interpret-assessment
for (ClassificationReason reason : response.getRiskAnalysis().getReasonsList()) {
System.out.println(reason);
}

float recaptchaScore = response.getRiskAnalysis().getScore();
System.out.println("The reCAPTCHA score is: " + recaptchaScore);

// Get the assessment name (id). Use this to annotate the assessment.
String assessmentName = response.getName();
System.out.println(
"Assessment name: " + assessmentName.substring(assessmentName.lastIndexOf("/") + 1));
}
}
}
// [END recaptcha_enterprise_create_assessment]
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
/*
* Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package recaptcha;

// [START recaptcha_enterprise_create_site_key]

import com.google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseServiceClient;
import com.google.recaptchaenterprise.v1.CreateKeyRequest;
import com.google.recaptchaenterprise.v1.Key;
import com.google.recaptchaenterprise.v1.ProjectName;
import com.google.recaptchaenterprise.v1.WebKeySettings;
import com.google.recaptchaenterprise.v1.WebKeySettings.IntegrationType;
import java.io.IOException;

public class CreateSiteKey {

public static void main(String[] args) throws IOException {
// TODO(developer): Replace these variables before running the sample.
String projectID = "your-project-id";
String domainName = "domain-name";

createSiteKey(projectID, domainName);
}

/**
* Create reCAPTCHA Site key which binds a domain name to a unique key.
*
* @param projectID : GCloud Project ID.
* @param domainName : Specify the domain name in which the reCAPTCHA should be activated.
*/
public static String createSiteKey(String projectID, String domainName) throws IOException {
// Initialize client that will be used to send requests. This client only needs to be created
// once, and can be reused for multiple requests. After completing all of your requests, call
// the `client.close()` method on the client to safely
// clean up any remaining background resources.
try (RecaptchaEnterpriseServiceClient client = RecaptchaEnterpriseServiceClient.create()) {

// Set the type of reCAPTCHA to be displayed.
// For different types, see: https://cloud.google.com/recaptcha-enterprise/docs/keys
Key scoreKey =
Key.newBuilder()
.setDisplayName("any_descriptive_name_for_the_key")
.setWebSettings(
WebKeySettings.newBuilder()
.addAllowedDomains(domainName)
.setAllowAmpTraffic(false)
.setIntegrationType(IntegrationType.SCORE)
.build())
.build();

CreateKeyRequest createKeyRequest =
CreateKeyRequest.newBuilder()
.setParent(ProjectName.of(projectID).toString())
.setKey(scoreKey)
.build();

// Get the name of the created reCAPTCHA site key.
Key response = client.createKey(createKeyRequest);
String keyName = response.getName();
String recaptchaSiteKey = keyName.substring(keyName.lastIndexOf("/") + 1);
System.out.println("reCAPTCHA Site key created successfully. Site Key: " + recaptchaSiteKey);
return recaptchaSiteKey;
}
}
}
// [END recaptcha_enterprise_create_site_key]
Loading