Patent ID: 8665860

Claim:
A relay device that relays a message transmitted from a terminal device to a server through a communications network, comprising: an attribute information obtaining unit configured to obtain attribute information related to a user of the terminal device from which the message was received; an identifier obtaining unit configured to obtain an identifier inserted into a message to the terminal device by a server that generates a session in response to the message from the terminal device, the identifier being for identifying the session; an information storage unit configured to store the identifier that is obtained by the identifier obtaining unit and that is associated with the attribute information obtained by the attribute information obtaining unit; a first determination unit configured to determine whether or not the information storage unit stores attribute information coincident to the obtained attribute information when the attribute information obtaining unit obtained the attribute information; an identifier insertion unit configured to insert an identifier associated with the attribute information into a message that triggered obtainment of attribute information by the attribute information obtaining unit when the determination unit determined that the information storage unit stores attribute information coincident to the attribute information obtained by the attribute information obtaining unit; a relay unit configured to transmit a message into which the identifier insertion unit inserted an identifier; a second determination unit configured to determine whether or not, in an attribute type information table in which a name of a service is associated with attribute information used for the service, all attribute information used for the service associated with a name of a service specified by the message is included in the attribute information obtained by the attribute information obtaining unit; and a reception unit configured to generate and send an attribute inquiry request to an authentication server when there is any missing attribute information, thereby receiving missing attribute information.