1krb5_get_init_creds_opt_set_expire_callback -  Set an expiration callback in initial credential options.
2=========================================================================================================
3
4..
5
6.. c:function:: krb5_error_code krb5_get_init_creds_opt_set_expire_callback(krb5_context context, krb5_get_init_creds_opt * opt, krb5_expire_callback_func cb, void * data)
7
8..
9
10
11:param:
12
13	          **[in]** **context** - Library context
14
15	          **[in]** **opt** - Options structure
16
17	          **[in]** **cb** - Callback function
18
19	          **[in]** **data** - Callback argument
20
21
22..
23
24
25
26..
27
28
29
30
31
32
33
34Set a callback to receive password and account expiration times.
35
36
37
38 *cb* will be invoked if and only if credentials are successfully acquired. The callback will receive the *context* from the calling function and the *data* argument supplied with this API. The remaining arguments should be interpreted as follows:
39
40
41
42If *is_last_req* is true, then the KDC reply contained last-req entries which unambiguously indicated the password expiration, account expiration, or both. (If either value was not present, the corresponding argument will be 0.) Furthermore, a non-zero *password_expiration* should be taken as a suggestion from the KDC that a warning be displayed.
43
44
45
46If *is_last_req* is false, then *account_expiration* will be 0 and *password_expiration* will contain the expiration time of either the password or account, or 0 if no expiration time was indicated in the KDC reply. The callback should independently decide whether to display a password expiration warning.
47
48
49
50Note that *cb* may be invoked even if credentials are being acquired for the kadmin/changepw service in order to change the password. It is the caller's responsibility to avoid displaying a password expiry warning in this case.
51
52
53
54
55
56
57
58
59
60
61..
62
63
64
65
66
67.. warning::
68
69	 Setting an expire callback with this API will cause krb5_get_init_creds_password() not to send password expiry warnings to the prompter, as it ordinarily may.
70
71
72
73
74.. note::
75
76	 New in 1.9
77
78
79