auth::local::authentication::Authenticate (private)

 auth::local::authentication::Authenticate username password \
    [ parameters ] [ authority_id ]

Defined in packages/acs-authentication/tcl/local-procs.tcl

Implements the Authenticate operation of the auth_authentication service contract for the local account implementation.

Parameters:
username (required)
password (required)
parameters (optional)
authority_id (optional)

Partial Call Graph (max 5 caller/called nodes):
%3 test_acs_sc_impl_new_from_spec acs_sc_impl_new_from_spec (test acs-service-contract) auth::local::authentication::Authenticate auth::local::authentication::Authenticate test_acs_sc_impl_new_from_spec->auth::local::authentication::Authenticate _ _ (public) auth::local::authentication::Authenticate->_ acs_user::get_by_username acs_user::get_by_username (public) auth::local::authentication::Authenticate->acs_user::get_by_username ad_check_password ad_check_password (public) auth::local::authentication::Authenticate->ad_check_password auth::authority::local auth::authority::local (public) auth::local::authentication::Authenticate->auth::authority::local AcsSc.auth_authentication.authenticate.local AcsSc.auth_authentication.authenticate.local (private) AcsSc.auth_authentication.authenticate.local->auth::local::authentication::Authenticate auth::local::authentication::register_impl auth::local::authentication::register_impl (private) auth::local::authentication::register_impl->auth::local::authentication::Authenticate

Testcases:
acs_sc_impl_new_from_spec
Source code:
    array set auth_info [list]

    if {$authority_id eq ""} {
        set authority_id [auth::authority::local]
    }

    set user_id [acs_user::get_by_username -authority_id $authority_id -username $username]
    if { $user_id eq "" } {
        set result(auth_status) "no_account"
        return [array get result]
    }

    if { [ad_check_password $user_id $password] } {
        set auth_info(auth_status) "ok"
    } else {
        set auth_info(auth_status) "bad_password"
        set auth_info(auth_message) [_ acs-authentication.Invalid_username_or_password]
        return [array get auth_info]
    }

    # We set 'external' account status to 'ok', because the
    # local account status will be checked anyways by the framework
    set auth_info(account_status) ok

    return [array get auth_info]
XQL Not present:
PostgreSQL, Oracle
Generic XQL file:
packages/acs-authentication/tcl/local-procs.xql

[ hide source ] | [ make this the default ]
Show another procedure: