You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2017/09/14 11:37:07 UTC

isis git commit: Merge branch 'ISIS-1712_pr-87' ... with some additional fixes/clarifications. [Forced Update!]

Repository: isis
Updated Branches:
  refs/heads/master 0b729b061 -> 43f65cb61 (forced update)


Merge branch 'ISIS-1712_pr-87' ... with some additional fixes/clarifications.


Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/43f65cb6
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/43f65cb6
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/43f65cb6

Branch: refs/heads/master
Commit: 43f65cb61b9b3fc6dca4f2524b09293a1014ba78
Parents: 9a228a2 7471e7f
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Wed Sep 13 18:01:44 2017 +0100
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Thu Sep 14 12:36:21 2017 +0100

----------------------------------------------------------------------
 .../_ugsec_configuring-isis-to-use-shiro.adoc   | 26 ++++++++++++++++++--
 1 file changed, 24 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/43f65cb6/adocs/documentation/src/main/asciidoc/guides/ugsec/_ugsec_configuring-isis-to-use-shiro.adoc
----------------------------------------------------------------------
diff --cc adocs/documentation/src/main/asciidoc/guides/ugsec/_ugsec_configuring-isis-to-use-shiro.adoc
index 3b930c1,b6d09ff..2068d84
--- a/adocs/documentation/src/main/asciidoc/guides/ugsec/_ugsec_configuring-isis-to-use-shiro.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/ugsec/_ugsec_configuring-isis-to-use-shiro.adoc
@@@ -16,7 -16,8 +16,9 @@@ Both the xref:../ugfun/ugfun.adoc#_ugfu
  
  == Telling Apache Isis to use Shiro
  
--To tell Apache Isis to use Shiro, update the `WEB-INF/isis.properties` file:
 -(sure about this? The HelloWorld App uses Shiro without this properties set. Instead the use of Shiro is mentioned in ../domainapp/application/HelloworldAppManifest.java: .withAuthMechanism("shiro")?! )
++To tell Apache Isis to use Shiro, set the "isis.authentication" and "isis.authorisation" properties.
++
++One way to do this is by updating the `WEB-INF/isis.properties` file:
  
  [source,ini]
  ----
@@@ -24,7 -25,7 +26,27 @@@ isis.authentication=shir
  isis.authorization=shiro
  ----
  
--This installs the appropriate implementation (the `ShiroAuthenticatorOrAuthorizor` class) that use Shiro's APIs to perform authentication and authorization:
++Alternatively (as of `1.15.0`) you can set them both programmatically from the `AppManifestAbstract.BUILDER` (see xref:../rgcms/rgcms.adoc#__rgcms_classes_AppManifest-bootstrapping_bootstrapping_AppManifestAbstract[here]).
++For example, the xref:../ugfun/ugfun.adoc#_ugfun_getting-started_helloworld-archetype[HelloWorld archetype] bootstraps using:
++
++[source,java]
++----
++public class HelloWorldAppManifest extends AppManifestAbstract {
++
++    public static final Builder BUILDER = Builder
++            .forModules(HelloWorldModule.class)
++            .withConfigurationPropertiesFile(
++                HelloWorldAppManifest.class, "isis.properties")
++            .withAuthMechanism("shiro");
++
++    public HelloWorldAppManifest() {
++        super(BUILDER);
++    }
++}
++----
++
++
++Either way, this installs the appropriate implementation (the `ShiroAuthenticatorOrAuthorizor` class) that use Shiro's APIs to perform authentication and authorization:
  
  image::{_imagesdir}security/security-apis-impl/configure-isis-to-use-shiro.png[width="600px",link="{_imagesdir}security/security-apis-impl/configure-isis-to-use-shiro.png"]