I already have Oauth2 service and i want integrate it into OpenKm. Can I do this? Please teach me how to integrate this ?
Might be done. You should take a look at spring security and play with the source code to success on it.
First I suggest downloading the openkm portable development environment at https://www.openkm.com/en/download.html ( you have a video explaining hot to get it running ). Take a look how security it is implemented ( security-context.xml, web.xml etc... ) and then look for integrate the spring security oath there ( take care looking for the spring security version used in the community edition )