Krb_public.TgtSourceval check_valid :
?valid_for_at_least:Krb_public__.Import.Time.Span.t ->
cred_cache:Krb_internal_public.Std.Cred_cache.t ->
Principal.Name.t ->
unit Async.Deferred.Or_error.tCheck cred_cache for a tgt that will still be valid after valid_for_at_least.
val ensure_valid :
?valid_for_at_least:Krb_public__.Import.Time.Span.t ->
?keytab:Keytab.Path.t ->
cred_cache:Krb_internal_public.Std.Cred_cache.t ->
Principal.Name.t ->
unit Async.Deferred.Or_error.tTry to initialize cred_cache with a tgt for principal if a valid one does not exist. Attempt to acquire a new TGT in the following ways:
cred_cache)keytab (if supplied)cred_cacheval initialize_in_new_cred_cache :
?cache_type:Krb_internal_public.Std.Cache_type.t ->
?keytab:Keytab.Path.t ->
Principal.Name.t ->
Krb_internal_public.Std.Cred_cache.t Async.Deferred.Or_error.tCreate a new, empty credential cache and use keytab and principal to get and store a tgt into the cache.
Creating a new cred cache of types FILE or DIR leaks files on disk. The finalizer for Cred_cache.t closes the file and frees the memory associated with it, but the file doesn't get removed from disk.
val get_cached_tgt :
?valid_for_at_least:Krb_public__.Import.Time.Span.t ->
cred_cache:Krb_internal_public.Std.Cred_cache.t ->
Principal.Name.t ->
Krb_internal_public.Std.Credentials.t Async.Deferred.Or_error.tval keep_valid_indefinitely :
?refresh_every:Krb_public__.Import.Time.Span.t ->
?on_error:[ `Ignore | `Raise | `Call of Core.Error.t -> unit ] ->
?keytab:Keytab.Path.t ->
?abort:unit Async.Deferred.t ->
cred_cache:Cred_cache.t ->
Principal.Name.t ->
unit Async.Deferred.Or_error.tEnsure an initial tgt. Upon success an ensure_tgt_valid job is scheduled to run every refresh_every. If one of these background jobs fails, the on_error of the first caller determines how to handle the error.