# KIM Credential Iterator Reference Documentation

## Functions

- kim_error kim_credential_iterator_create (kim_credential_iterator *out_credential_iterator, kim_ccache in_ccache)
    Get a credential iterator to enumerate credentials in a ccache.
- kim_error kim_credential_iterator_next (kim_credential_iterator in_credential_iterator, kim_credential *out_credential)
    Get the next credential in a ccache.
- void kim_credential_iterator_free (kim_credential_iterator *io_credential_iterator)
    Free memory associated with a credential iterator.

## Function Documentation

kim_error kim_credential_iterator_create | ( | kim_credential_iterator * | out_credential_iterator,
|  | kim_ccache | in_ccache |
| ) |  |  |

Get a credential iterator to enumerate credentials in a ccache.

Parameters:

  | out_credential_iterator | on exit, a credential iterator object for in_ccache. Must be freed with kim_credential_iterator_free().
  | in_ccache | a ccache object.

Returns:
  On success, KIM_NO_ERROR. On failure, an error code representing the failure.

kim_error kim_credential_iterator_next | ( | kim_credential_iterator | in_credential_iterator,
|  | kim_credential * | out_credential |
| ) |  |  |

Get the next credential in a ccache.

Parameters:

  | in_credential_iterator | a credential iterator object.
  | out_credential | on exit, the next credential in the ccache iterated by in_credential_iterator. Must be freed with kim_credential_free(). If there are no more credentials this argument will be set to NULL.

Returns:
  On success, KIM_NO_ERROR. On failure, an error code representing the failure.

void kim_credential_iterator_free | ( | kim_credential_iterator * | io_credential_iterator | ) |

Free memory associated with a credential iterator.

Parameters:

  | io_credential_iterator | a credential iterator object to be freed. Set to NULL on exit.