public class TokenGenerator extends Object
Modifier and Type | Field and Description |
---|---|
static org.apache.commons.logging.Log |
log |
Modifier and Type | Method and Description |
---|---|
Certificate |
fetchServerCertificate()
fetches the server certificates from the remote CN using the configured
CN baseurl from d1_libclient_java.
|
static TokenGenerator |
getInstance() |
String |
getJWT(String userId,
String fullName) |
org.dataone.service.types.v1.Session |
getSession(String token)
Extracts the subject from the token string, and attempts to get the
SubjectInfo from the CN.
|
static void |
main(String[] args)
For generating custom tokens outside of the portal workflow.
|
public static TokenGenerator getInstance() throws IOException
IOException
public Certificate fetchServerCertificate()
public String getJWT(String userId, String fullName) throws com.nimbusds.jose.JOSEException, ParseException, IOException
com.nimbusds.jose.JOSEException
ParseException
IOException
public org.dataone.service.types.v1.Session getSession(String token)
token
- the given JWT token stringpublic static void main(String[] args)
args
- Copyright © 2020. All rights reserved.