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

Add documentation to Passport related classes #223

Merged
merged 1 commit into from
Oct 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ public User(User user) {
@Column(name = "long_term_token")
private String token;

/**
* This is a passport for the user represented as a string. See the Passport class for more information.
*/
@Column(name = "passport")
private String passport;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@

import java.util.List;

/**
* The Ga4ghPassportV1 class is a model for the GA4GH Passport V1 object.
* <a href="https://github.com/ga4gh-duri/ga4gh-duri.github.io/blob/master/researcher_ids/ga4gh_passport_v1.md#passport-claim">passport-claim</a>
*
* <p>
* <b>Description</b>
* <br>
* The GA4GH Passport V1 object is a JSON Web Token (JWT) that contains information about a user's identity, the signing entity (ga4ghVisaV1), and
* the permissions they have been granted (RasDbgapPermissions).
* </p>
*/
public class Ga4ghPassportV1 {

private String iss;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
package edu.harvard.hms.dbmi.avillach.auth.model.ras;

/**
* The Ga4ghVisaV1 class is a model for the GA4GH Visa V1 object.
* <a href="https://github.com/ga4gh-duri/ga4gh-duri.github.io/blob/master/researcher_ids/ga4gh_passport_v1.md#visa-claim">ga4gh_passport_v1.md#visa-claim</a>
*/
public class Ga4ghVisaV1 {

private String type;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

import java.util.List;

/**
* The RAS Passport JWT as defined by RAS in their developer documentation.
* Contains a list of claims about the user and the user's identity and a list of GA4Gh Passports as defined in the GA4GH standard.
*/
public class Passport {

private String sub;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,21 @@

import com.fasterxml.jackson.annotation.JsonProperty;

/**
* The RasDbgapPermission class is a model for the RAS dbGaP Permission object. An example of this object is:
* This is not a real study, but an example of what the object looks like.
* <pre>
* {
* "consent_name": "Unrestricted",
* "phs_id": "phs000123",
* "version": "v1",
* "participant_set": "p1",
* "consent_group": "c1",
* "role": "pi",
* "expiration": 1234567890
* }
* </pre>
*/
public class RasDbgapPermission {

@JsonProperty("consent_name")
Expand Down