1. A non-transitory computer-readable medium having instructions stored thereon that, when executed by a processor, cause the processor to perform authentication for real-time communications (RTC), the performing comprising: receiving a request from a browser application for web authentication of a user; performing the web authentication by a security provider by reaching a first resource, wherein the security provider determines a security principal for the user; executing a security Groovy script to obtain an identity mapping from a second resource different than the first resource, wherein the identity mapping maps the security principal to an Internet Protocol (IP) Multimedia Subsystem (IMS) identity; providing the identity mapping to a runtime Groovy script; establishing a first signaling channel between the browser application and a session controller to initiate the RTC; and establishing a second signaling channel by the runtime Groovy script between the session controller and a session initiation protocol (SIP) network based on the identity mapping.