pkit_auth_session_key — Verifies a session key and returns the user ID and session ID


  sub pkit_auth_session_key {
    my ($model, $ses_key) = @_;

    # check whether $ses_key is valid, if so return user id in $user_id
    # your code here.........

    return $ok ? ($user_id, $session_id) : undef;


Verifies the session key (previously generated by auth_credential) and returns the user ID, and session ID.

The returned user ID will be fed to $r->connection->user.

The returned session ID will used to retreive the session from the database.