Question about velocity: using VelocityView
Karla Borecky
kborecky at smith.edu
Fri Oct 14 15:04:38 EDT 2016
Thank you, Scott - I have those things open as I write this and I'll study
them. I'm new to java stuff so I have a bit of a steep learning curve.
So, to reiterate! What I want to do is 1) have our users run an application
that will allow them to select an image and phrase to display on the shib
login page; the application will store their choices in cookies; and then
2) be able to read those cookie values into variables that I can use in the
login.vm. I don't want to use javascript directly inside the view to read
the cookies because that is readable by anyone going to the page, and then
the phishing jerks would have the name of the cookies, defeating the
purpose of foiling their annoying practices. (Someone in our department got
a phishing email that had grabbed our shib login images and all the rest of
it, and it annoyed the hell out of me.)
The only other thing I could think to do would be to store something
generic like a number in the cookie, which would then refer to values
stored in a local database, but then I have to deal with accessing db
tables inside a view, which seems even more complicated.
What is the developer version of the phrase 'my eyes are too big for my
stomach'?
On Fri, Oct 14, 2016 at 1:32 PM, Cantor, Scott <cantor.2 at osu.edu> wrote:
> > I've been researching the custom object feature, and I saw examples of
> it for
> > use in the attribute resolving/creation, but that wouldn't help me here
> > because that happens after the auth piece has been completed, yes?
>
> The custom object mechanism has nothing to do with when it's used, you can
> inject custom objects or maps of objects into any view or script so that
> you can always access anything you want to access from them.
>
> > but would I put a custom object in there? Doesn't seem like a file anyone
> > should be messing with.
>
> https://wiki.shibboleth.net/confluence/display/IDP30/VelocityVariables
>
> See "custom". You need to define shibboleth.CustomViewContext in
> global.xml to be something. An alias to a bean you want it to point to, a
> map of other beans like the example, etc.
>
> <util:map id="shibboleth.CustomViewContext">
> <entry key="cookieManager" value-ref="shibboleth.
> PersistentCookieManager"/>
> </util:map>
>
> > I don't suppose you could give me an example piece of code using the
> cookie
> > manager?
>
> Nothing that wouldn't be vastly more confusing than just reading the
> javadoc.
>
> > or if there is some API documentation I haven't found...?
>
> The java-support javadocs are linked on the Configuration page, and that
> class is included in that module.
>
> -- Scott
>
>
> --
> To unsubscribe from this list send an email to
> users-unsubscribe at shibboleth.net
>
--
Karla Borecky
Systems Administrator
ITS
Smith College
Northampton, MA 01063
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/users/attachments/20161014/dcae9387/attachment.html>
More information about the users
mailing list