import { JwtBody } from '../model/jwtBody';
export class JwtUtil{
    
    static getJwtBodyFromToken(token: string): JwtBody{
        let body: string = token.split('.')[1];
        let jwtBody: JwtBody;
        try{
            jwtBody = JSON.parse(atob(body));
        } catch(error){
            jwtBody = null;
        }
        return jwtBody;
    }



}