public static Optional<Principal> withWebIdClaim(final Claims claims) {
        final String webid = claims.get(WEBID, String.class);
        if (webid == null) return empty();
        LOGGER.debug("Using JWT claim with webid: {}", webid);
        return of(new OAuthPrincipal(webid));
    }
public static Optional < Principal > withWebIdClaim ( final Claims claims ) { final String webid = claims . get ( WEBID , String . class ) ; if ( webid == null ) return empty ( ) ; LOGGER . debug ( "Using JWT claim with webid: {}" , webid ) ; return of ( new OAuthPrincipal ( webid ) ) ; }
Generate a Principal from a webid claim.
@param claims the JWT claims
@return a Principal, if one can be generated from a webid claim