roleList = Arrays.asList(roleNames.split(ROLE_NAMES_DELIMETER));
- return roleList.stream().anyMatch(role -> subject.hasRole(role.trim()));
- }
- return false;
-
- }
-}
diff --git a/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/HasPermissionTag.java b/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/HasPermissionTag.java
deleted file mode 100644
index 001cb22..0000000
--- a/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/HasPermissionTag.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright 2019 Joern Muehlencord (joern@muehlencord.de).
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package de.muehlencord.shirofaces.tags;
-
-import javax.faces.view.facelets.TagConfig;
-
-/**
- *
- * @author Joern Muehlencord (joern@muehlencord.de)
- */
-public class HasPermissionTag extends AbstractPermissionTag {
-
- public HasPermissionTag(TagConfig config) {
- super(config);
- }
-
- @Override
- protected boolean hasPermission(String permission) {
- return isPermitted(permission);
- }
-
-
-
-}
diff --git a/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/HasRoleTag.java b/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/HasRoleTag.java
deleted file mode 100644
index bdd06c2..0000000
--- a/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/HasRoleTag.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright 2019 Joern Muehlencord (joern@muehlencord.de).
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package de.muehlencord.shirofaces.tags;
-
-import javax.faces.view.facelets.TagConfig;
-
-/**
- *
- * @author Joern Muehlencord (joern@muehlencord.de)
- */
-public class HasRoleTag extends AbstractRoleTag {
-
- public HasRoleTag(TagConfig config) {
- super(config);
- }
-
- @Override
- protected boolean hasRole(String role) {
- return getSubject() != null && getSubject().hasRole(role);
- }
-
-
-
-
-}
diff --git a/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/LacksPermissionTag.java b/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/LacksPermissionTag.java
deleted file mode 100644
index 974ce02..0000000
--- a/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/LacksPermissionTag.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright 2019 Joern Muehlencord (joern@muehlencord.de).
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package de.muehlencord.shirofaces.tags;
-
-import javax.faces.view.facelets.TagConfig;
-
-/**
- *
- * @author Joern Muehlencord (joern@muehlencord.de)
- */
-public class LacksPermissionTag extends AbstractPermissionTag {
-
- public LacksPermissionTag(TagConfig config) {
- super(config);
- }
-
- @Override
- protected boolean hasPermission(String permission) {
- return !isPermitted(permission);
- }
-
-
-}
diff --git a/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/LacksRoleTag.java b/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/LacksRoleTag.java
deleted file mode 100644
index 6781e22..0000000
--- a/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/LacksRoleTag.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright 2019 Joern Muehlencord (joern@muehlencord.de).
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package de.muehlencord.shirofaces.tags;
-
-import javax.faces.view.facelets.TagConfig;
-
-/**
- *
- * @author Joern Muehlencord (joern@muehlencord.de)
- */
-public class LacksRoleTag extends AbstractRoleTag {
-
- public LacksRoleTag(TagConfig config) {
- super(config);
- }
-
- @Override
- protected boolean hasRole(String role) {
- return getSubject() != null && getSubject().hasRole(role);
- }
-
-
-
-}
diff --git a/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/NotAuthenticatedTag.java b/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/NotAuthenticatedTag.java
deleted file mode 100644
index 6ef004d..0000000
--- a/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/NotAuthenticatedTag.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright 2019 Joern Muehlencord (joern@muehlencord.de).
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package de.muehlencord.shirofaces.tags;
-
-import javax.faces.view.facelets.TagConfig;
-
-/**
- *
- * @author Joern Muehlencord (joern@muehlencord.de)
- */
-public class NotAuthenticatedTag extends AbstractAuthenticationTag {
-
- public NotAuthenticatedTag(TagConfig config) {
- super(config);
- }
-
- @Override
- protected boolean isAuthenticated() {
- return getSubject() == null || !getSubject().isAuthenticated();
- }
-
-
-}
diff --git a/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/UserTag.java b/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/UserTag.java
deleted file mode 100644
index 49adda9..0000000
--- a/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/UserTag.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright 2019 Joern Muehlencord (joern@muehlencord.de).
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package de.muehlencord.shirofaces.tags;
-
-import javax.faces.view.facelets.TagConfig;
-
-/**
- *
- * @author Joern Muehlencord (joern@muehlencord.de)
- */
-public class UserTag extends AbstractAuthenticationTag {
-
- public UserTag(TagConfig config) {
- super(config);
- }
-
- @Override
- protected boolean isAuthenticated() {
- return getSubject() != null && getSubject().getPrincipal() != null;
- }
-
-}
diff --git a/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/unsupported/PrincipalTag.java b/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/unsupported/PrincipalTag.java
deleted file mode 100644
index 0136d87..0000000
--- a/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/unsupported/PrincipalTag.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright 2019 Joern Muehlencord (joern@muehlencord.de).
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package de.muehlencord.shirofaces.tags.unsupported;
-
-import de.muehlencord.shirofaces.tags.AbstractTag;
-import java.io.IOException;
-import javax.faces.component.UIComponent;
-import javax.faces.view.facelets.FaceletContext;
-import javax.faces.view.facelets.TagConfig;
-
-/**
- *
- * Tag used to print out the String value of a user's default principal, or a
- * specific principal as specified by the tag's attributes.
- *
- *
- *
- * If no attributes are specified, the tag prints out the toString()
- * value of the user's default principal. If the type attribute is
- * specified, the tag looks for a principal with the given type. If the
- * property attribute is specified, the tag prints the string value of
- * the specified property of the principal. If no principal is found or the user
- * is not authenticated, the tag displays nothing unless a defaultValue
- * is specified.
- *
- *
- * @author Joern Muehlencord (joern@muehlencord.de)
- */
-public class PrincipalTag extends AbstractTag {
-
- /**
- * creates a new principal tag
- *
- * @param config the configuration to use
- */
- public PrincipalTag(TagConfig config) {
- super(config);
- }
-
- @Override
- public void apply(FaceletContext fc, UIComponent uic) throws IOException {
- throw new UnsupportedOperationException("PrincipalTag Not supported yet.");
- }
-}
diff --git a/shiro-faces/src/main/resources/META-INF/shiro-faces.taglib.xml b/shiro-faces/src/main/resources/META-INF/shiro-faces.taglib.xml
deleted file mode 100644
index f6721b7..0000000
--- a/shiro-faces/src/main/resources/META-INF/shiro-faces.taglib.xml
+++ /dev/null
@@ -1,134 +0,0 @@
-
-
-
-
-
- http://shiro.apache.org/tags
-
-
-
-
- authenticated
- de.muehlencord.shirofaces.tags.AuthenticatedTag
- Displays body content only if the current user has successfully authenticated
- _during their current session_. It is more restrictive than the 'user' tag.
- It is logically opposite to the 'notAuthenticated' tag.
-
-
-
-
- guest
- de.muehlencord.shirofaces.tags.GuestTag
- Displays body content only if the current Subject IS NOT known to the system, either
- because they have not logged in or they have no corresponding 'RememberMe' identity. It is logically
- opposite to the 'user' tag.
-
-
-
-
- hasAnyPermission
- de.muehlencord.shirofaces.tags.HasAnyPermissionTag
- Displays body content only if the current user has one of the specified permissions from a comma-separated list of permissions.
-
- comma-separated list of permissions to check for
- name
- true
-
-
-
-
- hasAnyRoles
- de.muehlencord.shirofaces.tags.HasAnyRolesTag
- Displays body content only if the current user has one of the specified roles from a comma-separated list of role names.
-
- comma-separated list of roles to check for
- name
- true
-
-
-
-
- hasPermission
- de.muehlencord.shirofaces.tags.HasPermissionTag
- Displays body content only if the current user the given permission.
-
- the permission to check for
- name
- true
-
-
-
-
- hasRole
- de.muehlencord.shirofaces.tags.HasRoleTag
- Displays body content only if the current user has the given role.
-
- the role to check for
- name
- true
-
-
-
-
- lacksPermission
- de.muehlencord.shirofaces.tags.LacksPermissionTag
- Displays body content only if the current user has NOT the given permission.
-
- the permission to check for
- name
- true
-
-
-
-
- lacksRole
- de.muehlencord.shirofaces.tags.LacksRoleTag
- Displays body content only if the current user has NOT the given role.
-
- the role to check for
- name
- true
-
-
-
-
- notAuthenticated
- de.muehlencord.shirofaces.tags.NotAuthenticatedTag
- Displays body content only if the current user has NOT succesfully authenticated
- _during their current session_. It is logically opposite to the 'authenticated' tag.
-
-
-
-
- user
- de.muehlencord.shirofaces.tags.UserTag
- Displays body content only if the current Subject has a known identity, either
- from a previous login or from 'RememberMe' services. Note that this is semantically different
- from the 'authenticated' tag, which is more restrictive. It is logically
- opposite to the 'guest' tag.
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/util/pom.xml b/util/pom.xml
index 47f62f0..b4b4f75 100644
--- a/util/pom.xml
+++ b/util/pom.xml
@@ -26,7 +26,7 @@ limitations under the License.
shared
de.muehlencord
- 1.3.2-SNAPSHOT
+ 2.0.0-SNAPSHOT