001/*- 002 * #%L 003 * Smile CDR - CDR 004 * %% 005 * Copyright (C) 2016 - 2024 Smile CDR, Inc. 006 * %% 007 * All rights reserved. 008 * #L% 009 */ 010package ca.cdr.api.util; 011 012public class SmileClaimConstants { 013 /** 014 * This claim is the prefix of all additional custom smile claims. 015 */ 016 public static final String SMILE_CLAIM_PREFIX = "smile_"; 017 018 public static String getSmileCustomClaim(String theName) { 019 return SMILE_CLAIM_PREFIX + theName; 020 } 021 022 /** 023 * The member id (patient id) claim that we will add 024 * to access tokens. 025 */ 026 public static final String MEMBER_ID_CLAIM = SmileClaimConstants.getSmileCustomClaim("member_id"); 027 028 /** 029 * The consent id claim that we add to the access token. 030 * This is the id of the consent linked to the patient 031 * identified by member_id/smile_member_id. 032 */ 033 public static final String CONSENT_ID_CLAIM = SmileClaimConstants.getSmileCustomClaim("consent_id"); 034 035 /** 036 * MemberId parameter for OpenId logins; 037 * MemberId is the patient ID received from a previously 038 * made $member-match request. 039 */ 040 public static final String MEMBER_ID = "member_id"; 041}