private String extractAuthTokenFromCookieList ( String cookieList ) { if ( cookieList == null || cookieList . length ( ) == 0 ) { return null ; } String [ ] cookies = cookieList . split ( ";" ) ; for ( String cookie : cookies ) { if ( cookie . trim ( ) . startsWith ( tokenKey ) ) { return cookie . trim ( ) . substring ( tokenKey . length ( ) + 1 ) ; } } return null ; }
Extracts the accesstoken from cookies