api to authenticate using kid