Le 29/11/15 02:50, Marc Boorshtein a écrit : > Sorry, was working on some other projects. My thought was instead of code > that looks like this: > > requestOptions = new KOptions(); > requestOptions.add(KrbOption.USE_TGT, tgt); > //requestOptions.add(KrbOption.SERVER_PRINCIPAL, > "HTTP/freeipa.rhelent.lan"); > requestOptions.add(KrbOption.SERVER_PRINCIPAL, new > PrincipalName("HTTP/freeipa.rhelent....@rhelent.lan",NameType.NT_UNKNOWN)); > requestOptions.add(KrbOption.FORWARDABLE,true); > requestOptions.add(KrbOption.PROXIABLE,false); > requestOptions.add(KrbOption.RENEWABLE_OK,false); > > I would think this would be more OO: > > requestOptions = new KOptions(); > requestOptions.setTgt(tgt); > //requestOptions.setServerPrincipal("HTTP/freeipa.rhelent.lan"); > requestOptions.setServerPrincipal(new > PrincipalName("HTTP/freeipa.rhelent....@rhelent.lan",NameType.NT_UNKNOWN)); > requestOptions.setForwardable(true); > requestOptions.setProxiable(false); > requestOptions.setRenewable(false); > > Could keep it backed by a set of options
Agreed. This is fully compatible with the definition of all the KrbOptions enums, except thay will not be visible by the end user.