Diplomatic asylum is a concept created by a Convention signed by members of the Organisation of American States, which includes Ecuador but not the USA which has never signed or ratified, and not UK or Sweden which are not members. The text is here. Basically it allows states to grant asylum outside of their borders, and the Government of the territory in which the grant takes place then has to grant safe passage out of their territory. Article III is quite interesting, it prevents the granting of asylum to those under trial for common offences (which means an offence in both the granting and the host nation) - presumably rape is an offence in Ecuador - is Assange 'under trial' in terms of international law - probably not, he is under extradition - not trial?
Anyway - the UK does not recognise diplomatic asylum, so it is not going to do Assange much good!
In reality this is a diplomatic issue which Ecuador, Sweden and HMG have to sort out between themselves.
It is very unlikely that HMG will remove the inviolability of the Embassy as that is one or two steps away from declaring war in diplomatic terms and would need to be justified by evidence of terrorism or drug running or equivalent taking place on the premises - see this useful article here.
HMG is under an absolute duty to remove Assange to Sweden, but cannot be blamed for refusing to invade the little piece of Knightsbridge which is the sovereign territory of Ecuador. HMG will just have to wait until Assange leaves......