@Sensitive
    public JsonWebToken createJwtPrincipal(String username, ArrayList<String> groups, @Sensitive JwtToken jwtToken) {
        String methodName = "createJwtPrincipal";
        if (tc.isDebugEnabled()) {
            Tr.entry(tc, methodName, username, groups, jwtToken);
        }
        // TODO Auto-generated method stub

        String compact = null;
        String type = TYPE_JWT_TOKEN;
        if (jwtToken != null) {
            compact = jwtToken.compact();
            type = (String) jwtToken.getClaims().get(Claims.TOKEN_TYPE);
        }
        //        String payload = null;
        //        if (compact != null) {
        //            String[] parts = JsonUtils.splitTokenString(compact);
        //            if (parts.length > 0) {
        //                payload = JsonUtils.fromBase64ToJsonString(parts[1]); // payload - claims
        //            }
        //        }
        //        JwtClaims jwtclaims = new JwtClaims();
        //
        //        if (payload != null) {
        //            Map<String, Object> payloadClaims = org.jose4j.json.JsonUtil.parseJson(payload);
        //            Set<Entry<String, Object>> entries = payloadClaims.entrySet();
        //            Iterator<Entry<String, Object>> it = entries.iterator();
        //            while (it.hasNext()) {
        //                Entry<String, Object> entry = it.next();
        //
        //                String key = entry.getKey();
        //                Object value = entry.getValue();
        //                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
        //                    Tr.debug(tc, "Key : " + key + ", Value: " + value);
        //                }
        //                if (key != null && value != null) {
        //                    jwtclaims.setClaim(key, value);
        //                }
        //            }
        //        }
        //        jwtclaims.setStringClaim(org.eclipse.microprofile.jwt.Claims.raw_token.name(), compact);
        //        fixJoseTypes(jwtclaims);
        DefaultJsonWebTokenImpl token = new DefaultJsonWebTokenImpl(compact, type, username);
        if (tc.isDebugEnabled()) {
            Tr.exit(tc, methodName, token);
        }
        return token;
    }
@ Sensitive public JsonWebToken createJwtPrincipal ( String username , ArrayList < String > groups , @ Sensitive JwtToken jwtToken ) { String methodName = "createJwtPrincipal" ; if ( tc . isDebugEnabled ( ) ) { Tr . entry ( tc , methodName , username , groups , jwtToken ) ; } String compact = null ; String type = TYPE_JWT_TOKEN ; if ( jwtToken != null ) { compact = jwtToken . compact ( ) ; type = ( String ) jwtToken . getClaims ( ) . get ( Claims . TOKEN_TYPE ) ; } DefaultJsonWebTokenImpl token = new DefaultJsonWebTokenImpl ( compact , type , username ) ; if ( tc . isDebugEnabled ( ) ) { Tr . exit ( tc , methodName , token ) ; } return token ; }
@param username
@param groups
@param jwtToken
@return
@throws JoseException