-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Trivial - P5
-
None
-
Affects Version/s: None
-
Component/s: kerberos
-
None
From the ticket:
All flags in the kerberos package are exported at the root level namespace
// GSS Flags
const GSS_C_DELEG_FLAG = 1;
const GSS_C_MUTUAL_FLAG = 2;
const GSS_C_REPLAY_FLAG = 4;
const GSS_C_SEQUENCE_FLAG = 8;
const GSS_C_CONF_FLAG = 16;
const GSS_C_INTEG_FLAG = 32;
const GSS_C_ANON_FLAG = 64;
const GSS_C_PROT_READY_FLAG = 128;
const GSS_C_TRANS_FLAG = 256;// GSS_OID
const GSS_C_NO_OID = 0;
const GSS_MECH_OID_KRB5 = 9;
const GSS_MECH_OID_SPNEGO = 6;
This pollutes the root level namespace with a lot of values that are not relevant to the user unless they are using the functions that require these flags.I would suggest exporting these values as two additional namespaces
export const GssFlags =
Unknown macro: { GSS_C_DELEG_FLAG};
export const GssOidFlags =
Unknown macro: { GSS_C_NO_OID};
This will not only free up the kerberos namespace of a lot of values, but will allow for clearer documentation and for checking that the functions are not used with the wrong arguments. I am currently writing the TypeScript type definition file for this package, and the current implementation unfortunately doesn't allow me to type check these flags.I understand this is a breaking change, but these values could be added alongside the current declared ones instead as a compromise.