JwtBuilder.fromToken constructor

JwtBuilder.fromToken(
  1. String token
)

Implementation

factory JwtBuilder.fromToken(String token) {
  final splittedToken = token.split('.');
  if (splittedToken.length != 3) {
    throw DataExtractorTokenException.fromMessage("invalid token");
  }
  return JwtBuilder._internal(splittedToken[0], splittedToken[1]);
}