Add get claims API. Security module refactoring.