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
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
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
val clamp_exn : t -> min:t -> max:t -> t
val clamp : t -> min:t -> max:t -> t Base__.Or_error.t
type comparator_witness
val comparator : (t, comparator_witness) Base__Comparator.comparator
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
module Replace_polymorphic_compare : sig ... end
include Core.Hashable.S_plain with type t := t
include Ppx_compare_lib.Comparable.S with type t := t
val compare : t Base__Ppx_compare_lib.compare
include Ppx_hash_lib.Hashable.S with type t := t
val hash_fold_t : t Base__Ppx_hash_lib.hash_fold
val hash : t -> Base__Ppx_hash_lib.Std.Hash.hash_value
val hashable : t Core__.Hashtbl.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.