View Source sasl_auth (sasl_auth v2.0.2)

Wrapper for cyrus sasl library for GSSAPI mechanism support in erlang applications. Each function (except kinit) corresponds to functions at libsasl2

Link to this section Summary

Link to this section Types

-type available_mechs() :: [binary()].
-type host() :: binary().
-type keytab_path() :: file:filename_all().
-type principal() :: binary().
-type sasl_code() ::
    sasl_badserv | sasl_noverify | sasl_weakpass | sasl_badauth | sasl_tooweak | sasl_nomem |
    sasl_need_old_passwd | sasl_badprot | sasl_expired | sasl_nouser | sasl_badbinding |
    sasl_badvers | sasl_configerr | sasl_noauthz | sasl_ok | sasl_nouserpass | sasl_notdone |
    sasl_notinit | sasl_trans | sasl_interact | sasl_bufover | sasl_pwlock |
    sasl_constraint_violat | sasl_continue | sasl_fail | sasl_encrypt | sasl_badparam |
    sasl_badmac | sasl_tryagain | sasl_unavail | sasl_wrongmech | sasl_nochange | sasl_disabled |
    sass_nomech | unknown.
-type service_name() :: binary().
-type state() :: reference().

Link to this section Functions

-spec client_listmech(State :: state()) -> {ok, available_mechs()} | {error, {sasl_code(), binary()}}.
Link to this function

client_new(ServiceName, Host, Principal)

View Source
-spec client_new(ServiceName :: service_name(), Host :: host(), Principal :: principal()) ->
              {ok, state()} | {error, sasl_code()}.
-spec client_start(State :: state()) -> {ok, {sasl_code(), binary()}} | {error, {sasl_code(), binary()}}.
Link to this function

client_step(State, Token)

View Source
-spec client_step(state(), binary()) -> {ok, {sasl_code(), binary()}} | {error, {sasl_code(), binary()}}.
-spec init() ->
        ok |
        {error, {load_failed | bad_lib | load | reload | upgrade | old_code, Text :: string()}}.
Link to this function

kinit(KeyTabPath, Principal)

View Source
-spec kinit(KeyTabPath :: keytab_path(), Principal :: principal()) ->
         ok | {error, {binary(), integer(), binary()}}.