A method, comprising: receiving by a target device (UE-2) from an initiating device (UE-1) a request to establish a unicast device to device communication between the initiating device (UE-1) and the target device (UE-2); starting an unicast link authentication procedure comprising: sending by the target device (UE-2) an authentication request to the initiating device (UE-1) for authenticating the initiating device (UE-1); receiving by the target device (UE-2) from the initiating device (UE-1) an authentication response to the authentication request including one or more parameters related to the authentication; and providing by the target device (UE-2) information of the one or more parameters to an application in the target device (UE-2); characterized in that the method further comprises: examining by the application whether the one or more parameters can be accepted; if the examining reveals that at least one of the one or more parameters cannot be accepted, sending by the target device (UE-2) an authentication failure message to the initiating device (UE-1); and aborting by the target device (UE-2) a procedure that triggered the unicast link authentication procedure. receiving by a target device (UE-2) from an initiating device (UE-1) a request to establish a unicast device to device communication between the initiating device (UE-1) and the target device (UE-2); starting an unicast link authentication procedure comprising: sending by the target device (UE-2) an authentication request to the initiating device (UE-1) for authenticating the initiating device (UE-1); receiving by the target device (UE-2) from the initiating device (UE-1) an authentication response to the authentication request including one or more parameters related to the authentication; and providing by the target device (UE-2) information of the one or more parameters to an application in the target device (UE-2); characterized in that the method further comprises: examining by the application whether the one or more parameters can be accepted; if the examining reveals that at least one of the one or more parameters cannot be accepted, sending by the target device (UE-2) an authentication failure message to the initiating device (UE-1); and aborting by the target device (UE-2) a procedure that triggered the unicast link authentication procedure. sending by the target device (UE-2) an authentication request to the initiating device (UE-1) for authenticating the initiating device (UE-1); receiving by the target device (UE-2) from the initiating device (UE-1) an authentication response to the authentication request including one or more parameters related to the authentication; and providing by the target device (UE-2) information of the one or more parameters to an application in the target device (UE-2); characterized in that the method further comprises: examining by the application whether the one or more parameters can be accepted; if the examining reveals that at least one of the one or more parameters cannot be accepted, sending by the target device (UE-2) an authentication failure message to the initiating device (UE-1); and aborting by the target device (UE-2) a procedure that triggered the unicast link authentication procedure. examining by the application whether the one or more parameters can be accepted; if the examining reveals that at least one of the one or more parameters cannot be accepted, sending by the target device (UE-2) an authentication failure message to the initiating device (UE-1); and aborting by the target device (UE-2) a procedure that triggered the unicast link authentication procedure.