Constructor and Description |
---|
PsToken(String key)
Ctor.
|
PsToken(String key,
long seconds)
Ctor.
|
Modifier and Type | Method and Description |
---|---|
Opt<Identity> |
enter(Request req)
Authenticate the user by the request.
|
Response |
exit(Response res,
Identity idt)
Wrap the response with the user.
|
public PsToken(String key)
PsToken(key, 3600)
, signing with 256
bit.key
- The secret key to sign withpublic PsToken(String key, long seconds)
key
- The secret key to sign withseconds
- The life span of the token.public Opt<Identity> enter(Request req) throws IOException
Pass
enter
in interface Pass
req
- The requestIOException
Copyright © 2015–2019 Take. All rights reserved.