@ SuppressWarnings ( "unchecked" ) public void setAccessToken ( String token ) { if ( ! StringUtils . isBlank ( token ) ) { try { String payload = Utils . base64dec ( StringUtils . substringBetween ( token , "." , "." ) ) ; Map < String , Object > decoded = ParaObjectUtils . getJsonMapper ( ) . readValue ( payload , Map . class ) ; if ( decoded != null && decoded . containsKey ( "exp" ) ) { this . tokenKeyExpires = ( Long ) decoded . get ( "exp" ) ; this . tokenKeyNextRefresh = ( Long ) decoded . get ( "refresh" ) ; } } catch ( Exception ex ) { this . tokenKeyExpires = null ; this . tokenKeyNextRefresh = null ; } } this . tokenKey = token ; }
Sets the JWT access token .