際際滷s from Apache Shiro User Group presentation by Les Hazlewood on API design and RESTful API security using Shiro. Demonstrates design and security principles using Stormpath API.
5. Error
Representa=on
≒ HTTP
Status
Code
≒ Applica:on-足speci鍖c
Error
Code
(18
4xx,
6
5xx)
≒ End-足user
Message
≒ Developer
Message
≒ More
Info
URL
6. Error
Representa=on
Example
HTTP/1.1
404
Not
Found
{
"status":
404,
"code":
404,
"message":
"Oops!
That
applica:on
cannot
be
found.",
"developerMessage":
"The
speci鍖ed
Applica:on
cannot
be
found.
If
you
accessed
this
url
via
a
stale
href
reference,
it
might
be
helpful
to
acquire
the
tenant's
Applica:on
Collec:on
Resource
to
obtain
the
current
list
of
applica:ons.",
"moreInfo":
"hHp://www.stormpath.com/docs/errors/404"
}
7. Statelessness
≒ No
sessions!
Session
clustering
(and
all
that
it
implies)
≒ How
do
you
prevent
sessions?
Your
code?
Framework
code?