Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
oharsta committed Nov 4, 2021
2 parents b42d199 + 93eb9ab commit cebb3a1
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 2 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [2.0.0] - 2020-11-18
- First item
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Open Badges Validator Core
# Open Badges Validator Core - Modified to be used with Edubadges

Open Badges Validator Core is a python package designed to verify the validity of Open Badges based on a variety of
input sources and present a useful interface for accessing their properties and validation information. HTTP, Python
Expand Down
11 changes: 11 additions & 0 deletions openbadges/verifier/server/__main__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import json

import flask
import six
import os
from flask import Flask, redirect, render_template, request
Expand All @@ -22,6 +24,15 @@ def home():
return render_template('index.html', url=provided_url, recipient_profile=recipient_profile)


@app.route("/git.info", methods=['GET', 'OPTIONS'])
def git_info():
file = f"{os.path.dirname(os.path.realpath(__file__))}/static/git.info"
with open(file) as f:
response = flask.jsonify({'git': f.read()})
response.headers.add('Content', 'application/json')
return response


@app.route("/results", methods=['GET'])
def result_get_redirect():
return redirect('/')
Expand Down
3 changes: 3 additions & 0 deletions openbadges/verifier/server/static/git.info
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
a70db83
a70db832231cb60c305faada632d125365c74d55
develop
2 changes: 1 addition & 1 deletion openbadges/verifier/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def get_assertion(verification_results):
def get_assertion_image(verification_results, assertion_image_url):
if assertion_image_url:
original_json = verification_results.get('input', {}).get('original_json')
if original_json:
if original_json and assertion_image_url in original_json:
return original_json[assertion_image_url]


Expand Down

0 comments on commit cebb3a1

Please sign in to comment.