Tagged: openig
This topic has 0 replies, 1 voice, and was last updated 5 years, 6 months ago by waseem.
-
AuthorPosts
-
January 31, 2017 at 2:58 pm #15621
waseem
Participanthi Team,
As a sample test am trying to protect the sample URL http://www.w3schools.com/ and whenever i hit http://www.w3schools.com/protected. It should take me to openAM login screen and for some reason the request always take to http://www.w3schools.com/ does not hit my
openIG server.Below is the config’s.
config.json
{ "handler": { "type": "Router", "audit": "global", "baseURI": "http://www.w3schools.com/", "capture": "all" }, "heap": [ { "name": "LogSink", "type": "ConsoleLogSink", "config": { "level": "DEBUG" } }, { "name": "JwtSession", "type": "JwtSession" }, { "name": "capture", "type": "CaptureDecorator", "config": { "captureEntity": true, "_captureContext": true } } ] }
99-default.json
{ "handler": { "type": "DispatchHandler", "config": { "bindings": [{ "condition": "${request.cookies['iPlanetDirectoryPro'] == null}", "handler": { "type": "StaticResponseHandler", "capture": "all", "config": { "status": 302, "reason": "Found", "headers": { "Location": [ "http://OPENAMURL/openam/XUI/#login/&goto=${urlEncode(contexts.router.originalUri)}" ] }, "entity": "Redirecting to OpenAM..." } } }, { "comment": "This condition is optional, but included for clarity.", "condition": "${request.cookies['iPlanetDirectoryPro'] != null}", "handler": { "type": "Chain", "config": { "filters": [{ "type": "ScriptableFilter", "config": { "type": "application/x-groovy", "file": "UserAttrs.groovy" } }, { "type": "HeaderFilter", "config": { "messageType": "REQUEST", "add": {} } }], "handler": "ClientHandler" } } }] } }, "condition": "${matches(request.uri.path, '^/protected')}" }
-
AuthorPosts
Viewing 1 post (of 1 total)
You must be logged in to reply to this topic.