diff --git a/inspector-vc-web/pom.xml b/inspector-vc-web/pom.xml new file mode 100644 index 0000000..f2bd0e5 --- /dev/null +++ b/inspector-vc-web/pom.xml @@ -0,0 +1,179 @@ + + + 4.0.0 + + org.1edtech + vc-public-validator + 1.0.0 + + inspector-vc-web + + org.oneedtech.inspect.vc.web.ValidatorApplication + 2.6.7 + 2.6.7 + gcr.io/staging-1edtech/ims/inspector-vc-public + + + + + + docker + + false + + + + + io.fabric8 + docker-maven-plugin + 0.40.2 + + + + ${imageName} + + ${project.basedir}/Dockerfile + + ${project.version} + + + + linux/amd64 + linux/arm64 + windows/amd64 + + + + + + + + + build-docker.image + + build + tag + + + + push-docker-image + + push + + install + + gcr.io + + + + + + + + + + + + org.1edtech + inspector-web-public + + + + org.1edtech + inspector-vc + provided + + + + + org.springframework.boot + spring-boot-starter-web + + + + + org.springframework.boot + spring-boot-starter-thymeleaf + + + + + org.springframework.boot + spring-boot-starter-actuator + + + + + org.springframework.boot + spring-boot-starter + + + org.springframework.boot + spring-boot-starter-logging + + + + + + + org.springframework.boot + spring-boot-starter-log4j2 + + + + + org.springframework.boot + spring-boot-starter-test + test + + + org.junit.jupiter + junit-jupiter + + + + + + + org.springframework.boot + spring-boot-devtools + true + + + + + + + + org.springframework.boot + spring-boot-starter-parent + ${spring-boot-starter-parent.version} + import + pom + + + + + + + + org.springframework.boot + spring-boot-maven-plugin + ${spring-boot-maven-plugin.version} + + ${mainClass} + + + + + repackage + + + + + + + diff --git a/inspector-vc-web/src/main/java/org/oneedtech/inspect/vc/web/ValidatorApplication.java b/inspector-vc-web/src/main/java/org/oneedtech/inspect/vc/web/ValidatorApplication.java new file mode 100644 index 0000000..7852d07 --- /dev/null +++ b/inspector-vc-web/src/main/java/org/oneedtech/inspect/vc/web/ValidatorApplication.java @@ -0,0 +1,24 @@ +package org.oneedtech.inspect.vc.web; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.oneedtech.inspect.web.InspectorWebConfig; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.context.annotation.ComponentScan; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Import; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; + +@SpringBootApplication // == @SpringBootConfiguration @EnableAutoConfiguration @ComponentScan +@Configuration +@Import(InspectorWebConfig.class) +@ComponentScan("org.oneedtech.inspect.web") +public class ValidatorApplication implements WebMvcConfigurer { + + public static void main(String[] args) { + SpringApplication.run(ValidatorApplication.class, args); + } + + private final static Logger logger = LogManager.getLogger(); +} diff --git a/inspector-vc-web/src/main/resources/application.properties b/inspector-vc-web/src/main/resources/application.properties new file mode 100644 index 0000000..7c85e00 --- /dev/null +++ b/inspector-vc-web/src/main/resources/application.properties @@ -0,0 +1,16 @@ +# To build a docker image for distribution, set spring.profiles.active=prod and dockerMode=true +# To build a fatjar for deployment on the ims website with oauth sso, set dockerMode=false and spring.profiles.active=prod +# During development, set spring.profiles.active=dev. If dockerMode is true during devMode, a jwt license in /resources is used as a dummy. + +# to deploy jars to nexus: set profile=prod & dockerMode false, then mvn clean deploy -Dmaven.test.skip=true -P deploy-nexus +# to build docker: set profile=prod & dockerMode true, then mvn clean install -Dmaven.test.skip=true -P docker, then docker:push gcr.io/staging-1edtech/ims/inspector:0.x.0 + +#spring.profiles.active = dev | prod +spring.profiles.active=dev +dockerMode=false +app.version=1.0.0 + +# misc +spring.jackson.serialization.INDENT_OUTPUT=true +server.servlet.encoding.charset=UTF-8 +server.servlet.encoding.force-response=true \ No newline at end of file diff --git a/inspector-vc-web/src/main/resources/validators.json b/inspector-vc-web/src/main/resources/validators.json new file mode 100644 index 0000000..7f1576a --- /dev/null +++ b/inspector-vc-web/src/main/resources/validators.json @@ -0,0 +1,45 @@ +{ + "groups": [ + { + "id": "vc", + "name": "Verifiable Credentials", + "desc": "Verifiers for the Open Badges and Comprehensive Learner Record specifications" + } + ], + "validators" : [ + { + "id": "OB30Inspector", + "name": "Open Badges 3.0 Verifier", + "pkg": "org.oneedtech.inspect.vc", + "desc": "Verifies Open Badges 3.0 files", + "instr": "This validator supports Open Badges 3.0 files.", + "spec": "ob", + "group": "vc", + "supportsCertification": false, + "submissionTypes": ["upload","uri"] + }, + { + "id": "OB20Inspector", + "name": "Open Badges 2.0 Verifier", + "pkg": "org.oneedtech.inspect.vc", + "desc": "Verifies Open Badges 2.0 files", + "instr": "This validator supports Open Badges 2.0 files.", + "spec": "ob", + "group": "vc", + "supportsCertification": false, + "submissionTypes": ["upload","uri"] + }, + { + "id": "CLR20Inspector", + "name": "CLR 2.0 Verifier", + "pkg": "org.oneedtech.inspect.vc", + "desc": "Verifies Comprehensive Learner Record (CLR) 2.0 files", + "instr": "This validator supports Comprehensive Learner Record (CLR) 2.0 files.", + "spec": "clr", + "group": "vc", + "supportsCertification": false, + "submissionTypes": ["upload","uri"] + } + ] + +} \ No newline at end of file