{"action":"created","comment":{"url":"https://api.github.com/repos/ca-cwds/api-core/pulls/comments/180577124","pull_request_review_id":111011472,"id":180577124,"diff_hunk":"@@ -0,0 +1,50 @@\n+package gov.ca.cwds.authenticate.config;\n+\n+import java.io.IOException;\n+import java.io.InputStream;\n+\n+import org.slf4j.Logger;\n+import org.slf4j.LoggerFactory;\n+import org.yaml.snakeyaml.Yaml;\n+\n+import io.dropwizard.configuration.EnvironmentVariableSubstitutor;\n+import io.dropwizard.configuration.SubstitutingSourceProvider;\n+\n+/**\n+ * This class is used to read the yaml files values using {@link Yaml}.\n+ * \n+ * @author CWDS TPT-4 Team\n+ *\n+ */\n+public class ConfigUtils implements ConfigReader {","path":"api-core-test-support/src/main/java/gov/ca/cwds/authenticate/config/ConfigUtils.java","position":19,"original_position":19,"commit_id":"3281a53e3807b2fc58a4c3e727535424924c9005","original_commit_id":"3281a53e3807b2fc58a4c3e727535424924c9005","user":{"login":"tparkerosi","id":26878568,"avatar_url":"https://avatars3.githubusercontent.com/u/26878568?v=4","gravatar_id":"","url":"https://api.github.com/users/tparkerosi","html_url":"https://github.com/tparkerosi","followers_url":"https://api.github.com/users/tparkerosi/followers","following_url":"https://api.github.com/users/tparkerosi/following{/other_user}","gists_url":"https://api.github.com/users/tparkerosi/gists{/gist_id}","starred_url":"https://api.github.com/users/tparkerosi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tparkerosi/subscriptions","organizations_url":"https://api.github.com/users/tparkerosi/orgs","repos_url":"https://api.github.com/users/tparkerosi/repos","events_url":"https://api.github.com/users/tparkerosi/events{/privacy}","received_events_url":"https://api.github.com/users/tparkerosi/received_events","type":"User","site_admin":false},"body":"I think YmlReader, ConfigLoader, or something similar might be a better name. Its not so generic as to be doing a lot of utility stuff to the configuration. It's more generic in that it is loading a Yml configuration file.","created_at":"2018-04-10T21:44:28Z","updated_at":"2018-04-10T21:45:20Z","html_url":"https://github.com/ca-cwds/api-core/pull/266#discussion_r180577124","pull_request_url":"https://api.github.com/repos/ca-cwds/api-core/pulls/266","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/ca-cwds/api-core/pulls/comments/180577124"},"html":{"href":"https://github.com/ca-cwds/api-core/pull/266#discussion_r180577124"},"pull_request":{"href":"https://api.github.com/repos/ca-cwds/api-core/pulls/266"}}},"pull_request":{"url":"https://api.github.com/repos/ca-cwds/api-core/pulls/266","id":179740805,"html_url":"https://github.com/ca-cwds/api-core/pull/266","diff_url":"https://github.com/ca-cwds/api-core/pull/266.diff","patch_url":"https://github.com/ca-cwds/api-core/pull/266.patch","issue_url":"https://api.github.com/repos/ca-cwds/api-core/issues/266","number":266,"state":"open","locked":false,"title":"Adarsh int 1198 ft refactor","user":{"login":"AVandana-OSI","id":20781325,"avatar_url":"https://avatars2.githubusercontent.com/u/20781325?v=4","gravatar_id":"","url":"https://api.github.com/users/AVandana-OSI","html_url":"https://github.com/AVandana-OSI","followers_url":"https://api.github.com/users/AVandana-OSI/followers","following_url":"https://api.github.com/users/AVandana-OSI/following{/other_user}","gists_url":"https://api.github.com/users/AVandana-OSI/gists{/gist_id}","starred_url":"https://api.github.com/users/AVandana-OSI/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AVandana-OSI/subscriptions","organizations_url":"https://api.github.com/users/AVandana-OSI/orgs","repos_url":"https://api.github.com/users/AVandana-OSI/repos","events_url":"https://api.github.com/users/AVandana-OSI/events{/privacy}","received_events_url":"https://api.github.com/users/AVandana-OSI/received_events","type":"User","site_admin":false},"body":"### Technical Description\r\nCleaned up the authentication classes and created the interface to get the token.  Moved the yaml config files to separate package.\r\n\r\nIf other projects want to use the same implementation to get the token for there related API's, they have to create a separate yml file in their own project and extend the ConfigReader, so api-core can read your yaml values. Then call AuthenticationUtils to get the token based on the user type. Ferb API has already implemented few test cases. \r\n\r\n### Reference\r\nhttps://github.com/ca-cwds/API/blob/master/src/test/functional/java/gov/ca/cwds/api/FunctionalTest.java\r\n\r\n## Jira Link\r\nhttps://osi-cwds.atlassian.net/browse/INT-1517\r\n\r\n### Tests\r\n- [ ] I have included unit tests \r\n- [ ] I have included integration tests \r\n- [ ] I have included performance tests \r\n- [ ] I have included other tests \r\n- [x] I have NOT included tests \r\n<!---Please indicate why tests were not added.-->\r\n\r\n### Types of changes\r\n<!---What types of changes does your code introduce? Put an `x` in all the boxes that apply:-->\r\n- [ ] New feature (non-breaking change which adds functionality)\r\n- [x] Refactoring (No behavioral changes)\r\n- [ ] Bug fix (non-breaking change which fixes an issue)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)\r\n\r\n### Configuration changes\r\n<!---Please list all new configuration parameters introduced by this pull request and describe meaning.-->\r\n<!---Describe impact on automated deployment if any. Put N/A if not applicable.-->\r\n\r\n### Technical debt\r\n<!---If this pull request introduces some technical debt, please describe details and reference JIRA issues created to address this technical debt. Put N/A if not applicable.-->\r\n\r\n### Checklist:\r\n<!---Go over all the following points, and put an `x` in all the boxes that apply.-->\r\n<!---If you're unsure about any of these, don't hesitate to ask.-->\r\n- [x] My code is in a stable state ready to be deployable, but not necessarily complete.\r\n- [x] I promise on my honor as a CWDS developer to ensure I don't break the build, to check Lint/Rubocop, use best practices, to leave the code in better shape than I found it, and to have a good day.\r\n","created_at":"2018-04-05T17:11:47Z","updated_at":"2018-04-10T21:45:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7f3d7d8cabb68f17eaa55a25a4bb58cee29f4734","assignee":{"login":"AVandana-OSI","id":20781325,"avatar_url":"https://avatars2.githubusercontent.com/u/20781325?v=4","gravatar_id":"","url":"https://api.github.com/users/AVandana-OSI","html_url":"https://github.com/AVandana-OSI","followers_url":"https://api.github.com/users/AVandana-OSI/followers","following_url":"https://api.github.com/users/AVandana-OSI/following{/other_user}","gists_url":"https://api.github.com/users/AVandana-OSI/gists{/gist_id}","starred_url":"https://api.github.com/users/AVandana-OSI/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AVandana-OSI/subscriptions","organizations_url":"https://api.github.com/users/AVandana-OSI/orgs","repos_url":"https://api.github.com/users/AVandana-OSI/repos","events_url":"https://api.github.com/users/AVandana-OSI/events{/privacy}","received_events_url":"https://api.github.com/users/AVandana-OSI/received_events","type":"User","site_admin":false},"assignees":[{"login":"AVandana-OSI","id":20781325,"avatar_url":"https://avatars2.githubusercontent.com/u/20781325?v=4","gravatar_id":"","url":"https://api.github.com/users/AVandana-OSI","html_url":"https://github.com/AVandana-OSI","followers_url":"https://api.github.com/users/AVandana-OSI/followers","following_url":"https://api.github.com/users/AVandana-OSI/following{/other_user}","gists_url":"https://api.github.com/users/AVandana-OSI/gists{/gist_id}","starred_url":"https://api.github.com/users/AVandana-OSI/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AVandana-OSI/subscriptions","organizations_url":"https://api.github.com/users/AVandana-OSI/orgs","repos_url":"https://api.github.com/users/AVandana-OSI/repos","events_url":"https://api.github.com/users/AVandana-OSI/events{/privacy}","received_events_url":"https://api.github.com/users/AVandana-OSI/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":509564328,"url":"https://api.github.com/repos/ca-cwds/api-core/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"milestone":null,"commits_url":"https://api.github.com/repos/ca-cwds/api-core/pulls/266/commits","review_comments_url":"https://api.github.com/repos/ca-cwds/api-core/pulls/266/comments","review_comment_url":"https://api.github.com/repos/ca-cwds/api-core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ca-cwds/api-core/issues/266/comments","statuses_url":"https://api.github.com/repos/ca-cwds/api-core/statuses/3281a53e3807b2fc58a4c3e727535424924c9005","head":{"label":"ca-cwds:adarsh-INT-1198-FTRefactor","ref":"adarsh-INT-1198-FTRefactor","sha":"3281a53e3807b2fc58a4c3e727535424924c9005","user":{"login":"ca-cwds","id":16274270,"avatar_url":"https://avatars3.githubusercontent.com/u/16274270?v=4","gravatar_id":"","url":"https://api.github.com/users/ca-cwds","html_url":"https://github.com/ca-cwds","followers_url":"https://api.github.com/users/ca-cwds/followers","following_url":"https://api.github.com/users/ca-cwds/following{/other_user}","gists_url":"https://api.github.com/users/ca-cwds/gists{/gist_id}","starred_url":"https://api.github.com/users/ca-cwds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ca-cwds/subscriptions","organizations_url":"https://api.github.com/users/ca-cwds/orgs","repos_url":"https://api.github.com/users/ca-cwds/repos","events_url":"https://api.github.com/users/ca-cwds/events{/privacy}","received_events_url":"https://api.github.com/users/ca-cwds/received_events","type":"Organization","site_admin":false},"repo":{"id":77723779,"name":"api-core","full_name":"ca-cwds/api-core","owner":{"login":"ca-cwds","id":16274270,"avatar_url":"https://avatars3.githubusercontent.com/u/16274270?v=4","gravatar_id":"","url":"https://api.github.com/users/ca-cwds","html_url":"https://github.com/ca-cwds","followers_url":"https://api.github.com/users/ca-cwds/followers","following_url":"https://api.github.com/users/ca-cwds/following{/other_user}","gists_url":"https://api.github.com/users/ca-cwds/gists{/gist_id}","starred_url":"https://api.github.com/users/ca-cwds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ca-cwds/subscriptions","organizations_url":"https://api.github.com/users/ca-cwds/orgs","repos_url":"https://api.github.com/users/ca-cwds/repos","events_url":"https://api.github.com/users/ca-cwds/events{/privacy}","received_events_url":"https://api.github.com/users/ca-cwds/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ca-cwds/api-core","description":"Core classes used across api projects","fork":false,"url":"https://api.github.com/repos/ca-cwds/api-core","forks_url":"https://api.github.com/repos/ca-cwds/api-core/forks","keys_url":"https://api.github.com/repos/ca-cwds/api-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ca-cwds/api-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ca-cwds/api-core/teams","hooks_url":"https://api.github.com/repos/ca-cwds/api-core/hooks","issue_events_url":"https://api.github.com/repos/ca-cwds/api-core/issues/events{/number}","events_url":"https://api.github.com/repos/ca-cwds/api-core/events","assignees_url":"https://api.github.com/repos/ca-cwds/api-core/assignees{/user}","branches_url":"https://api.github.com/repos/ca-cwds/api-core/branches{/branch}","tags_url":"https://api.github.com/repos/ca-cwds/api-core/tags","blobs_url":"https://api.github.com/repos/ca-cwds/api-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ca-cwds/api-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ca-cwds/api-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/ca-cwds/api-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ca-cwds/api-core/statuses/{sha}","languages_url":"https://api.github.com/repos/ca-cwds/api-core/languages","stargazers_url":"https://api.github.com/repos/ca-cwds/api-core/stargazers","contributors_url":"https://api.github.com/repos/ca-cwds/api-core/contributors","subscribers_url":"https://api.github.com/repos/ca-cwds/api-core/subscribers","subscription_url":"https://api.github.com/repos/ca-cwds/api-core/subscription","commits_url":"https://api.github.com/repos/ca-cwds/api-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/ca-cwds/api-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/ca-cwds/api-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/ca-cwds/api-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/ca-cwds/api-core/contents/{+path}","compare_url":"https://api.github.com/repos/ca-cwds/api-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ca-cwds/api-core/merges","archive_url":"https://api.github.com/repos/ca-cwds/api-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ca-cwds/api-core/downloads","issues_url":"https://api.github.com/repos/ca-cwds/api-core/issues{/number}","pulls_url":"https://api.github.com/repos/ca-cwds/api-core/pulls{/number}","milestones_url":"https://api.github.com/repos/ca-cwds/api-core/milestones{/number}","notifications_url":"https://api.github.com/repos/ca-cwds/api-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ca-cwds/api-core/labels{/name}","releases_url":"https://api.github.com/repos/ca-cwds/api-core/releases{/id}","deployments_url":"https://api.github.com/repos/ca-cwds/api-core/deployments","created_at":"2016-12-31T03:46:08Z","updated_at":"2018-04-10T21:09:19Z","pushed_at":"2018-04-10T21:09:23Z","git_url":"git://github.com/ca-cwds/api-core.git","ssh_url":"git@github.com:ca-cwds/api-core.git","clone_url":"https://github.com/ca-cwds/api-core.git","svn_url":"https://github.com/ca-cwds/api-core","homepage":null,"size":17926,"stargazers_count":2,"watchers_count":2,"language":"Java","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":1,"open_issues":1,"watchers":2,"default_branch":"master"}},"base":{"label":"ca-cwds:master","ref":"master","sha":"bdf17840ce0372f553bd1ee906c27ad9179fc1ec","user":{"login":"ca-cwds","id":16274270,"avatar_url":"https://avatars3.githubusercontent.com/u/16274270?v=4","gravatar_id":"","url":"https://api.github.com/users/ca-cwds","html_url":"https://github.com/ca-cwds","followers_url":"https://api.github.com/users/ca-cwds/followers","following_url":"https://api.github.com/users/ca-cwds/following{/other_user}","gists_url":"https://api.github.com/users/ca-cwds/gists{/gist_id}","starred_url":"https://api.github.com/users/ca-cwds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ca-cwds/subscriptions","organizations_url":"https://api.github.com/users/ca-cwds/orgs","repos_url":"https://api.github.com/users/ca-cwds/repos","events_url":"https://api.github.com/users/ca-cwds/events{/privacy}","received_events_url":"https://api.github.com/users/ca-cwds/received_events","type":"Organization","site_admin":false},"repo":{"id":77723779,"name":"api-core","full_name":"ca-cwds/api-core","owner":{"login":"ca-cwds","id":16274270,"avatar_url":"https://avatars3.githubusercontent.com/u/16274270?v=4","gravatar_id":"","url":"https://api.github.com/users/ca-cwds","html_url":"https://github.com/ca-cwds","followers_url":"https://api.github.com/users/ca-cwds/followers","following_url":"https://api.github.com/users/ca-cwds/following{/other_user}","gists_url":"https://api.github.com/users/ca-cwds/gists{/gist_id}","starred_url":"https://api.github.com/users/ca-cwds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ca-cwds/subscriptions","organizations_url":"https://api.github.com/users/ca-cwds/orgs","repos_url":"https://api.github.com/users/ca-cwds/repos","events_url":"https://api.github.com/users/ca-cwds/events{/privacy}","received_events_url":"https://api.github.com/users/ca-cwds/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ca-cwds/api-core","description":"Core classes used across api projects","fork":false,"url":"https://api.github.com/repos/ca-cwds/api-core","forks_url":"https://api.github.com/repos/ca-cwds/api-core/forks","keys_url":"https://api.github.com/repos/ca-cwds/api-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ca-cwds/api-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ca-cwds/api-core/teams","hooks_url":"https://api.github.com/repos/ca-cwds/api-core/hooks","issue_events_url":"https://api.github.com/repos/ca-cwds/api-core/issues/events{/number}","events_url":"https://api.github.com/repos/ca-cwds/api-core/events","assignees_url":"https://api.github.com/repos/ca-cwds/api-core/assignees{/user}","branches_url":"https://api.github.com/repos/ca-cwds/api-core/branches{/branch}","tags_url":"https://api.github.com/repos/ca-cwds/api-core/tags","blobs_url":"https://api.github.com/repos/ca-cwds/api-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ca-cwds/api-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ca-cwds/api-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/ca-cwds/api-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ca-cwds/api-core/statuses/{sha}","languages_url":"https://api.github.com/repos/ca-cwds/api-core/languages","stargazers_url":"https://api.github.com/repos/ca-cwds/api-core/stargazers","contributors_url":"https://api.github.com/repos/ca-cwds/api-core/contributors","subscribers_url":"https://api.github.com/repos/ca-cwds/api-core/subscribers","subscription_url":"https://api.github.com/repos/ca-cwds/api-core/subscription","commits_url":"https://api.github.com/repos/ca-cwds/api-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/ca-cwds/api-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/ca-cwds/api-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/ca-cwds/api-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/ca-cwds/api-core/contents/{+path}","compare_url":"https://api.github.com/repos/ca-cwds/api-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ca-cwds/api-core/merges","archive_url":"https://api.github.com/repos/ca-cwds/api-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ca-cwds/api-core/downloads","issues_url":"https://api.github.com/repos/ca-cwds/api-core/issues{/number}","pulls_url":"https://api.github.com/repos/ca-cwds/api-core/pulls{/number}","milestones_url":"https://api.github.com/repos/ca-cwds/api-core/milestones{/number}","notifications_url":"https://api.github.com/repos/ca-cwds/api-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ca-cwds/api-core/labels{/name}","releases_url":"https://api.github.com/repos/ca-cwds/api-core/releases{/id}","deployments_url":"https://api.github.com/repos/ca-cwds/api-core/deployments","created_at":"2016-12-31T03:46:08Z","updated_at":"2018-04-10T21:09:19Z","pushed_at":"2018-04-10T21:09:23Z","git_url":"git://github.com/ca-cwds/api-core.git","ssh_url":"git@github.com:ca-cwds/api-core.git","clone_url":"https://github.com/ca-cwds/api-core.git","svn_url":"https://github.com/ca-cwds/api-core","homepage":null,"size":17926,"stargazers_count":2,"watchers_count":2,"language":"Java","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":1,"open_issues":1,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ca-cwds/api-core/pulls/266"},"html":{"href":"https://github.com/ca-cwds/api-core/pull/266"},"issue":{"href":"https://api.github.com/repos/ca-cwds/api-core/issues/266"},"comments":{"href":"https://api.github.com/repos/ca-cwds/api-core/issues/266/comments"},"review_comments":{"href":"https://api.github.com/repos/ca-cwds/api-core/pulls/266/comments"},"review_comment":{"href":"https://api.github.com/repos/ca-cwds/api-core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ca-cwds/api-core/pulls/266/commits"},"statuses":{"href":"https://api.github.com/repos/ca-cwds/api-core/statuses/3281a53e3807b2fc58a4c3e727535424924c9005"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"tparkerosi"}}