package krb

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type t =
  1. | User of string
  2. | Service of {
    1. service : string;
    2. hostname : string;
    }

A Name.t represents the conventional names that may appear in a Kerberos principal (i.e. the bit before "@REALM").

By default, when constructing a principal from this type, we assume that the principal is within the default realm configured in krb.conf. If realm information should be preserved (eg. within cross-realm environments), use Cross_realm_principal_name.t instead.

include Ppx_compare_lib.Comparable.S with type t := t
include Ppx_hash_lib.Hashable.S with type t := t
val sexp_of_t : t -> Sexplib0.Sexp.t

to_string returns either <username> or <service>/<hostname>.

of_string is lenient to inclusion of the realm (for all principals) and full qualification of the domain name (for service principals). We drop the provided realm and drop a provided domain name if it matches the default domain.

include Core.Stringable.S with type t := t
val of_string : string -> t
val to_string : t -> string
include Core.Comparable.S_plain with type t := t
include Base.Comparable.S with type t := t
include Base.Comparisons.S with type t := t
include Base.Comparisons.Infix with type t := t
val (>=) : t -> t -> bool
val (<=) : t -> t -> bool
val (=) : t -> t -> bool
val (>) : t -> t -> bool
val (<) : t -> t -> bool
val (<>) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int

ascending is identical to compare. descending x y = ascending y x. These are intended to be mnemonic when used like List.sort ~compare:ascending and List.sort ~cmp:descending, since they cause the list to be sorted in ascending or descending order, respectively.

val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool

between t ~low ~high means low <= t <= high

val clamp_exn : t -> min:t -> max:t -> t

clamp_exn t ~min ~max returns t', the closest value to t such that between t' ~low:min ~high:max is true.

Raises if not (min <= max).

val clamp : t -> min:t -> max:t -> t Base.Or_error.t
include Base.Comparator.S with type t := t
type comparator_witness
val validate_lbound : min:t Core.Maybe_bound.t -> t Validate.check
val validate_ubound : max:t Core.Maybe_bound.t -> t Validate.check
val validate_bound : min:t Core.Maybe_bound.t -> max:t Core.Maybe_bound.t -> t Validate.check
include Core.Hashable.S_plain with type t := t
include Ppx_compare_lib.Comparable.S with type t := t
val compare : t -> t -> int
include Ppx_hash_lib.Hashable.S with type t := t
val hash_fold_t : Base.Hash.state -> t -> Base.Hash.state
val hash : t -> Base.Hash.hash_value
val hashable : t Base.Hashable.t
module Table : Core.Hashtbl.S_plain with type key = t
module Hash_set : Core.Hash_set.S_plain with type elt = t
module Hash_queue : Core.Hash_queue.S with type key = t

accepts <username> or <service>/<hostname>

val to_username : t -> Username_kernel.Username.t option

Returns None if t is a Service

val to_username_exn : t -> Username_kernel.Username.t

Raises if t is a Service

val service_on_this_host : service:string -> t

Cross-realm

val of_cross_realm : Cross_realm_principal_name.t -> t
val with_realm : realm:Realm.t -> t -> Cross_realm_principal_name.t
OCaml

Innovation. Community. Security.