Freeciv21
Develop your civilization from humble roots to a global empire
auth.h
Go to the documentation of this file.
1 /***********************************************************************
2 _ ._ Copyright (c) 1996-2021 Freeciv21 and Freeciv contributors.
3  \ | This file is part of Freeciv21. Freeciv21 is free software: you
4  \_| can redistribute it and/or modify it under the terms of the
5  .' '. GNU General Public License as published by the Free
6  :O O: Software Foundation, either version 3 of the License,
7  '/ \' or (at your option) any later version. You should have
8  :X: received a copy of the GNU General Public License along with
9  :X: Freeciv21. If not, see https://www.gnu.org/licenses/.
10 ***********************************************************************/
11 #pragma once
12 
13 #include "shared.h"
14 
15 struct connection;
16 
17 bool auth_user(struct connection *pconn, char *username);
18 void auth_process_status(struct connection *pconn);
19 bool auth_handle_reply(struct connection *pconn, char *password);
20 
21 const char *auth_get_username(struct connection *pconn);
22 const char *auth_get_ipaddr(struct connection *pconn);
const char * auth_get_username(struct connection *pconn)
Get username for connection.
Definition: auth.cpp:317
bool auth_handle_reply(struct connection *pconn, char *password)
Receives a password from a client and verifies it.
Definition: auth.cpp:147
void auth_process_status(struct connection *pconn)
Checks on where in the authentication process we are.
Definition: auth.cpp:197
bool auth_user(struct connection *pconn, char *username)
Handle authentication of a user; called by handle_login_request() if authentication is enabled.
Definition: auth.cpp:56
const char * auth_get_ipaddr(struct connection *pconn)
Get connection ip address.
Definition: auth.cpp:328
char username[MAX_LEN_NAME]
Definition: connection.h:151
char password[MAX_LEN_PASSWORD]
Definition: connection.h:204