6cf56d0c71c39c382851b34d1e5c9acaff9ef4fc
[platform/upstream/krb5.git] / doc / html / _sources / appdev / refs / api / krb5_get_credentials.txt
1 krb5_get_credentials -  Get an additional ticket. 
2 ==================================================
3
4 ..
5
6 .. c:function:: krb5_error_code krb5_get_credentials(krb5_context context, krb5_flags options, krb5_ccache ccache, krb5_creds * in_creds, krb5_creds ** out_creds)
7
8 ..
9
10
11 :param:
12
13                   **[in]** **context** - Library context
14
15                   **[in]** **options** - Options
16
17                   **[in]** **ccache** - Credential cache handle
18
19                   **[in]** **in_creds** - Input credentials
20
21                   **[out]** **out_creds** - Output updated credentials
22
23
24 ..
25
26
27 :retval:
28          -   0   Success
29
30
31 :return:
32          -  Kerberos error codes 
33
34 ..
35
36
37
38
39
40
41
42 Use *ccache* or a TGS exchange to get a service ticket matching *in_creds* .
43
44
45
46 Valid values for *options* are: 
47  
48          - :data:`KRB5_GC_CACHED` Search only credential cache for the ticket
49  
50  
51          - :data:`KRB5_GC_USER_USER` Return a user to user authentication ticket
52  
53  *in_creds* must be non-null. *in_creds->client* and *in_creds->server* must be filled in to specify the client and the server respectively. If any authorization data needs to be requested for the service ticket (such as restrictions on how the ticket can be used), specify it in *in_creds->authdata* ; otherwise set *in_creds->authdata* to NULL. The session key type is specified in *in_creds->keyblock.enctype* , if it is nonzero.
54
55
56
57 The expiration date is specified in *in_creds->times.endtime* . The KDC may return tickets with an earlier expiration date. If *in_creds->times.endtime* is set to 0, the latest possible expiration date will be requested.
58
59
60
61 Any returned ticket and intermediate ticket-granting tickets are stored in *ccache* .
62
63
64
65 Use :c:func:`krb5_free_creds()` to free *out_creds* when it is no longer needed.
66
67
68
69
70
71
72
73
74
75
76 ..
77
78
79
80
81