A secure app api framework