Skip to content

Instantly share code, notes, and snippets.

@simplekjl
Forked from damaneice/partner-enrollment.md
Created June 22, 2019 15:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save simplekjl/caa20a602721d07cce47be9490f46ab9 to your computer and use it in GitHub Desktop.
Save simplekjl/caa20a602721d07cce47be9490f46ab9 to your computer and use it in GitHub Desktop.
How to deliver GitHub Education benefits to your students

How to deliver GitHub Education benefits to your students

Students at your school can quickly claim their GitHub Education benefits by visiting a unique web address. By visiting that address, GitHub will verify the student's academic status with your school and instantly deliver their benefits to them.

Your school can create a unique web address for each student by including three things in it:

  1. school_id: Your school’s unique identifier, provided by GitHub.

  2. student_id: The individual student’s unique identifier, defined by your school.

  3. signature: A code used to authenticate the message, produced by your school using an algorithm (instructions below).

Used together, your school can deliver each student a unique web address that looks something like this:

https://education.github.com/student/verify?school_id=1&student_id=1&signature=b89099fdb8a24b0e2ef8ab0de893bb9408392cbf84e8fb9186adb84a920c536c

How to produce each student’s ‘signature’

The algorithm you’ll use to create each student’s signature requires the aforementioned school_id and student_id, as well as an additional GitHub-provided secret_key.

The algorithm requires that each of these values be passed as strings -- not numerals.

Here, for example, is how you can then produce a student’s signature using Ruby:

signature = OpenSSL::HMAC.hexdigest(OpenSSL::Digest.new('sha256'), secret_key, school_id + student_id)

What students should expect

When a student receives their unique web address from your school, they can visit that address in any web browser. If they are already signed into GitHub on that browser, they’ll see a GitHub Education web page confirming that they’ve been verified.

screen shot 2018-07-09 at 10 11 02 am

If they’re not yet signed in, the student will simply be asked to sign in before seeing the confirmation web page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment