Tabnine Logo
JsonSerialization.toByteArray
Code IndexAdd Tabnine to your IDE (free)

How to use
toByteArray
method
in
org.jboss.resteasy.jwt.JsonSerialization

Best Java code snippets using org.jboss.resteasy.jwt.JsonSerialization.toByteArray (Showing top 8 results out of 315)

origin: resteasy/Resteasy

public static String toString(Object token, ResteasyProviderFactory factory) throws Exception
{
 byte[] bytes = toByteArray(token, factory);
 return new String(bytes);
}
origin: resteasy/Resteasy

public static String toString(Object token, boolean indent) throws Exception
{
 byte[] bytes = toByteArray(token, indent);
 return new String(bytes);
}
origin: resteasy/Resteasy

public static byte[] toByteArray(Object token, boolean indent) throws Exception
{
 ResteasyProviderFactory factory = new ResteasyProviderFactoryImpl();
 factory.register(new JWTContextResolver(indent));
 factory.register(ResteasyJackson2Provider.class);
 return toByteArray(token, factory);
}
origin: org.jboss.resteasy/jose-jwt

public static String toString(Object token, ResteasyProviderFactory factory) throws Exception
{
 byte[] bytes = toByteArray(token, factory);
 return new String(bytes);
}
origin: org.jboss.resteasy/jose-jwt

public static String toString(Object token, boolean indent) throws Exception
{
 byte[] bytes = toByteArray(token, indent);
 return new String(bytes);
}
origin: org.jboss.resteasy/skeleton-key-as7

protected String buildTokenString(PrivateKey privateKey, SkeletonKeyToken token)
{
 byte[] tokenBytes = null;
 try
 {
   tokenBytes = JsonSerialization.toByteArray(token, false);
 }
 catch (Exception e)
 {
   throw new RuntimeException(e);
 }
 return new JWSBuilder()
    .content(tokenBytes)
    .rsa256(privateKey);
}
origin: org.jboss.resteasy/jose-jwt

public static byte[] toByteArray(Object token, boolean indent) throws Exception
{
 ResteasyProviderFactory factory = new ResteasyProviderFactory();
 factory.register(new JWTContextResolver(indent));
 factory.register(ResteasyJacksonProvider.class);
 return toByteArray(token, factory);
}
origin: org.jboss.resteasy/skeleton-key-idp

protected AccessTokenResponse accessTokenResponse(PrivateKey privateKey, SkeletonKeyToken token)
{
 byte[] tokenBytes = null;
 try
 {
   tokenBytes = JsonSerialization.toByteArray(token, false);
 }
 catch (Exception e)
 {
   throw new RuntimeException(e);
 }
 String encodedToken = new JWSBuilder()
    .content(tokenBytes)
    .rsa256(privateKey);
 AccessTokenResponse res = new AccessTokenResponse();
 res.setToken(encodedToken);
 res.setTokenType("bearer");
 if (token.getExpiration() != 0)
 {
   long time = token.getExpiration() - (System.currentTimeMillis() / 1000);
   res.setExpiresIn(time);
 }
 return res;
}
org.jboss.resteasy.jwtJsonSerializationtoByteArray

Popular methods of JsonSerialization

  • fromBytes
  • toString

Popular in Java

  • Running tasks concurrently on multiple threads
  • scheduleAtFixedRate (Timer)
  • setContentView (Activity)
  • notifyDataSetChanged (ArrayAdapter)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • JList (javax.swing)
  • JTable (javax.swing)
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now