A method of determining a set of authentication protocols for authentication between a terminal and an authentication server of a communication network, the method comprising the steps of: - obtaining, by the terminal, information related to an access network via which the terminal is connected to the communication network, and/or at least one gateway node or intermediate network via which the terminal is connected to the communication network, wherein the obtained information related to at least one of the access network and/or the at least one gateway node or intermediate network comprises at least one of information about the identity or type of the at least one gateway node, information about the type of the intermediate network, information about the type of the access network, information about the type of the access between the terminal and the access network, information about a service set provided in the access network, information about access network advertisements provided and information about beacon frame settings provided in the access network, - determining, by the terminal from a plurality of authentication protocols available for authentication between the terminal and the authentication server, a set of authentication protocols to be supported by the terminal for authentication between the terminal and the authentication server based on a comparison of the obtained information with one or more predefined conditions related to the access network and/or the at least one gateway node or intermediate network; receiving, by the terminal, an offer from the authentication server of an authentication protocol; and - determining, by the terminal, whether the offered authentication protocol is contained in the set of authentication protocols to be supported by the terminal for authentication. - obtaining, by the terminal, information related to an access network via which the terminal is connected to the communication network, and/or at least one gateway node or intermediate network via which the terminal is connected to the communication network, wherein the obtained information related to at least one of the access network and/or the at least one gateway node or intermediate network comprises at least one of information about the identity or type of the at least one gateway node, information about the type of the intermediate network, information about the type of the access network, information about the type of the access between the terminal and the access network, information about a service set provided in the access network, information about access network advertisements provided and information about beacon frame settings provided in the access network, - determining, by the terminal from a plurality of authentication protocols available for authentication between the terminal and the authentication server, a set of authentication protocols to be supported by the terminal for authentication between the terminal and the authentication server based on a comparison of the obtained information with one or more predefined conditions related to the access network and/or the at least one gateway node or intermediate network; receiving, by the terminal, an offer from the authentication server of an authentication protocol; and - determining, by the terminal, whether the offered authentication protocol is contained in the set of authentication protocols to be supported by the terminal for authentication.