{"action":"created","issue":{"url":"https://api.github.com/repos/commercehub-oss/grails-shiro-cas/issues/9","labels_url":"https://api.github.com/repos/commercehub-oss/grails-shiro-cas/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/commercehub-oss/grails-shiro-cas/issues/9/comments","events_url":"https://api.github.com/repos/commercehub-oss/grails-shiro-cas/issues/9/events","html_url":"https://github.com/commercehub-oss/grails-shiro-cas/pull/9","id":57251066,"number":9,"title":"Unifying configuration for single/multi domain, Spock test cleanup","user":{"login":"chapmajs","id":1416862,"avatar_url":"https://avatars.githubusercontent.com/u/1416862?v=3","gravatar_id":"","url":"https://api.github.com/users/chapmajs","html_url":"https://github.com/chapmajs","followers_url":"https://api.github.com/users/chapmajs/followers","following_url":"https://api.github.com/users/chapmajs/following{/other_user}","gists_url":"https://api.github.com/users/chapmajs/gists{/gist_id}","starred_url":"https://api.github.com/users/chapmajs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chapmajs/subscriptions","organizations_url":"https://api.github.com/users/chapmajs/orgs","repos_url":"https://api.github.com/users/chapmajs/repos","events_url":"https://api.github.com/users/chapmajs/events{/privacy}","received_events_url":"https://api.github.com/users/chapmajs/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-02-10T22:56:19Z","updated_at":"2015-02-11T14:50:27Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/commercehub-oss/grails-shiro-cas/pulls/9","html_url":"https://github.com/commercehub-oss/grails-shiro-cas/pull/9","diff_url":"https://github.com/commercehub-oss/grails-shiro-cas/pull/9.diff","patch_url":"https://github.com/commercehub-oss/grails-shiro-cas/pull/9.patch"},"body":"This PR unifies the way in which this plugin is configured for single-domain and multi-domain scenarios. Instead of using one URL in one case, or a base URL + path in the other, the plugin is always configured with a base URL and path, and will optionally try to determine the path dynamically if multi-domain support is turned on.\r\n\r\nA single-domain configuration would look like this:\r\n\r\n```groovy\r\nsecurity.shiro.cas.serverUrl='https://sso.example.com/cas'\r\nsecurity.shiro.cas.baseServiceUrl='https://apps.example.com/my-app/'\r\nsecurity.shiro.cas.servicePath='/shiro-cas'\r\n```\r\n\r\nSwitching to a multi-domain scenario only requires the addition of one more config line:\r\n\r\n```groovy\r\nsecurity.shiro.cas.serverUrl='https://sso.example.com/cas'\r\nsecurity.shiro.cas.baseServiceUrl='https://apps.example.com/my-app/'\r\nsecurity.shiro.cas.servicePath='/shiro-cas'\r\nsecurity.shiro.cas.multiDomain=true\r\n```\r\n\r\nThis makes the code easier to follow, reduces code repetition, and will make a set of modifications I'm working on much simpler.\r\n\r\nI also cleaned up the tests, extracting sample configurations to a fixture class, and making the example URLs consistent."},"comment":{"url":"https://api.github.com/repos/commercehub-oss/grails-shiro-cas/issues/comments/73892838","html_url":"https://github.com/commercehub-oss/grails-shiro-cas/pull/9#issuecomment-73892838","issue_url":"https://api.github.com/repos/commercehub-oss/grails-shiro-cas/issues/9","id":73892838,"user":{"login":"CrossfireCurt","id":17998,"avatar_url":"https://avatars.githubusercontent.com/u/17998?v=3","gravatar_id":"","url":"https://api.github.com/users/CrossfireCurt","html_url":"https://github.com/CrossfireCurt","followers_url":"https://api.github.com/users/CrossfireCurt/followers","following_url":"https://api.github.com/users/CrossfireCurt/following{/other_user}","gists_url":"https://api.github.com/users/CrossfireCurt/gists{/gist_id}","starred_url":"https://api.github.com/users/CrossfireCurt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CrossfireCurt/subscriptions","organizations_url":"https://api.github.com/users/CrossfireCurt/orgs","repos_url":"https://api.github.com/users/CrossfireCurt/repos","events_url":"https://api.github.com/users/CrossfireCurt/events{/privacy}","received_events_url":"https://api.github.com/users/CrossfireCurt/received_events","type":"User","site_admin":false},"created_at":"2015-02-11T14:50:27Z","updated_at":"2015-02-11T14:50:27Z","body":"Everything else looks good! Looking forward to your change(s), thanks!"}}