-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding support for more property types
- Loading branch information
1 parent
8b06110
commit 2447f39
Showing
3 changed files
with
79 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
sdk/src/main/java/org/wso2/spring/security/abac/util/GeneralUtils.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package org.wso2.spring.security.abac.util; | ||
|
||
import javax.servlet.http.Cookie; | ||
import java.util.HashMap; | ||
import java.util.Map; | ||
|
||
/** | ||
* @author Randika Navagamuwa | ||
*/ | ||
class GeneralUtils { | ||
|
||
static Map<String, String> extractValuesFromCookies(Cookie[] cookies) { | ||
final Map<String, String> cookieValues = new HashMap<>(); | ||
|
||
for (Cookie currentCookie : cookies) { | ||
cookieValues.put(currentCookie.getName(), currentCookie.getValue()); | ||
} | ||
return cookieValues; | ||
} | ||
|
||
static String[] splitContextPath(String contextPath){ | ||
return contextPath.split("/"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters