java的claims_Java JWTClaimsSet.getStringClaim方法代码示例

import com.nimbusds.jwt.JWTClaimsSet; //导入方法依赖的package包/类

/**

* Parses authz code from string (JSON)

*

* @param authorizeCodeClaimsSet

* JSON String representation of the code

* @return AuthorizeCodeClaimsSet instance if parsing is successful.

* @throws ParseException

* if parsing fails for example due to incompatible types.

*/

public static AuthorizeCodeClaimsSet parse(String authorizeCodeClaimsSet) throws ParseException {

JWTClaimsSet acClaimsSet = JWTClaimsSet.parse(authorizeCodeClaimsSet);

// Check existence and type of mandatory fields and values

if (!VALUE_TYPE_AC.equals(acClaimsSet.getClaims().get(KEY_TYPE))) {

throw new ParseException("claim type must have value ac", 0);

}

//Mandatory fields

if (acClaimsSet.getStringClaim(KEY_ISSUER) == null) {

throw new ParseException("claim iss must exist and not be null", 0);

}

if (acClaimsSet.getStringClaim(KEY_USER_PRINCIPAL) == null) {

throw new ParseException("claim sub must exist and not be null", 0);

}

if (acClaimsSet.getStringArrayClaim(KEY_CLIENTID) == null) {

throw new ParseException("claim aud must exist and not be null", 0);

}

if (acClaimsSet.getDateClaim(KEY_EXPIRATION_TIME) == null) {

throw new ParseException("claim exp must exist and not be null", 0);

}

if (acClaimsSet.getDateClaim(KEY_ISSUED_AT) == null) {

throw new ParseException("claim iat must exist and not be null", 0);

}

if (acClaimsSet.getStringClaim(KEY_AC_ID) == null) {

throw new ParseException("claim jti must exist and not be null", 0);

}

if (acClaimsSet.getStringClaim(KEY_ACR) == null) {

throw new ParseException("claim acr must exist and not be null", 0);

}

if (acClaimsSet.getDateClaim(KEY_AUTH_TIME) == null) {

throw new ParseException("claim auth_time must exist and not be null", 0);

}

if (acClaimsSet.getStringClaim(KEY_REDIRECT_URI) == null) {

throw new ParseException("claim redirect_uri must exist and not be null", 0);

}

if (acClaimsSet.getStringClaim(KEY_SCOPE) == null) {

throw new ParseException("claim scope must exist and not be null", 0);

}

//Voluntary fields

if (acClaimsSet.getClaims().containsKey(KEY_CLAIMS)) {

acClaimsSet.getJSONObjectClaim(KEY_CLAIMS);

}

if (acClaimsSet.getClaims().containsKey(KEY_NONCE)) {

acClaimsSet.getStringClaim(KEY_NONCE);

}

return new AuthorizeCodeClaimsSet(acClaimsSet);

}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
SELECT CS.CLAIMS_ID, CE.LONG_NAME CORPORATENAME, CS.PATIENT_NAME, CS.EMPLOYEE_NAME,CS.DEPARTMENT,E.SUBSIDIARY ,E.BRANCH, CS.ADMISSION_DATE, CS.DISCHARGEABLE_DATE , CS.PROVIDER_NAME, CS.PANEL_PROVIDER, TRIM(DS.ICD_CODE)||', '||DS.DESCRIPTION DIAGNOSISNAME, CS.MC_TAKEN_DAY ,CR.DESCRIPTION COVERAGE_DESCRIPTION, SD2.FDESC CLAIMTYPE,CS.REMARKS, CS.DUE_TOTAL, CS.PAID_TO_CLAIMANT, CS.PAID_BY_CLAIMANT, CS.AUTHORIZATION_CODE, CS.SERVICE_DATE,CS.RECORD_NO,CS.SUB_RECORD_NO,CS.PLAN_ID,CS.TRANSMISSION_DATE,CS.CLAIMS_REC_DATE, CS.CLAIMS_STATUS ,CS.APPROVED_BY, CS.HOSP_INVOICE_NO, CS.TERMINAL_ID, CS.TERMINAL_TYPE, CS.DEDUCTIBLE,CS.POLICY_NO,CS.PAYEE_NAME,CS.CARD_NO, CS.DOCRCV_BY, CS.CENTRE_CODE ,CS.DOCUMENT_NO,CS.MRN , NVL((SELECT UPLDT FROM (SELECT UPLDT FROM SYT_ATTACHDOC LD WHERE TO_NUMBER(TRIM(LD.KEY1))=CS.CLAIMS_ID AND LD.MATERIAL_TYPE IN('申诉材料','补充材料','调查材料') AND ROWNUM<2 ORDER BY UPLDT DESC) WHERE ROWNUM<2),CS.SERVICE_DATE) AS LAST_DOCUMENT_RECEIVED_DATE FROM CLAIMS CS, CORPORATE CE, COVERAGE_MASTER CR, SYC_REFCD SD1, SYC_REFCD SD2, DIAGNOSIS DS , EMPLOYEE E WHERE CS.COVERAGE_ID = CR.COVERAGE_CODE AND CS.CORPORATE_CODE = CE.CORP_CODE AND CS.PRIMARY_DIAGNOSIS = DS.ICD_CODE AND CS.CLAIM_TYPE = SD1.REFCD AND CS.CARD_NO = E.CARD_NO AND SD1.VAR1 = SD2.REFCD AND SD1.MODID = 'ES' AND SD1.REFGRP = 'CLAIMTYP' AND SD2.MODID = 'ES' AND SD2.REFGRP = 'CLAIM_APPLICABLE' AND CS.PLAN_ID!='TEST-2023-GLOBAL-PLAN-DEMO' AND (CS.PAYOR_CODE,CS.CENTRE_CODE) IN (SELECT SYFIELD(STNCD,'*',1,1), SYFIELD(STNCD,'*',2,1) FROM SYM_USRSTN WHERE USRID='SYSTEM' AND STNTYP IN ('PC')) AND (CS.CORPORATE_CODE IN (SELECT STNCD FROM SYM_USRSTN WHERE USRID='SYSTEM' AND STNTYP IN ('PY','CO')) OR (CS.PAYOR_CODE,CS.CENTRE_CODE) IN (SELECT SYFIELD(STNCD,'*',1,1), SYFIELD(STNCD,'*',2,1) FROM SYM_USRSTN WHERE USRID='SYSTEM' AND STNTYP IN ('PC'))) AND CS.CLAIMS_REC_DATE>=TO_DATE('1999-01-01','yyyy-MM-dd') AND CS.CLAIMS_REC_DATE<TO_DATE('2099-01-01','yyyy-MM-dd')+1
06-11
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值