Module Awso_cognito_idp.UserSource

Sourcemodule Attribute : sig ... end
Sourcetype attribute = Attribute.t
Sourcetype t = {
  1. username : string;
  2. attributes : attribute list;
  3. access_token : string;
}
include Ppx_yojson_conv_lib.Yojsonable.S with type t := t
Sourceval t_of_yojson : Yojson.Safe.t -> t
Sourceval yojson_of_t : t -> Yojson.Safe.t
Sourcetype msg = string
Sourceval required_attribute : t -> name:string -> f:(attribute -> 'a option) -> ('a, msg) result

required_attribute x ~name ~f looks for the attribute a named name in the attributes of x. If it is found, returns f applied to this attribute, otherwise returns an error message.

Sourceval required_attribute_exn : t -> name:string -> f:(attribute -> 'a option) -> 'a
Sourceval optional_attribute : t -> f:(attribute -> 'a option) -> 'a option

optional_attribute x ~f looks for the attribute satisfying f in the attributes of x. If it is found, returns f applied to this attribute, otherwise returns None.

Sourceval email : t -> (string, msg) result

email x looks for the email attribute of x. If it is found, returns the email string, otherwise returns an error message.

Sourceval email_exn : t -> string
Sourceval preferred_name : t -> string option option

preferred_name x returns the value of the preferred_name attribute of x if it exists, otherwise returns None.

Sourceval family_name : t -> (string, msg) result

family_name x looks for the family_name attribute of x. If it is found, returns the family_name string, otherwise returns an error message.

Sourceval family_name_exn : t -> string
Sourceval name : t -> string option

name x returns the value of the name attribute of x if it exists, otherwise returns None.

Sourcemodule Exn : sig ... end