protected void checkApiToken ( String apiToken ) { if ( StringUtils . isBlank ( apiToken ) ) throw new MissingApiTokenException ( "Empty key" ) ; if ( apiToken . length ( ) != TOKEN_LENGTH ) throw new MissingApiTokenException ( "Wrong length" ) ; if ( ! apiToken . matches ( HEX_PATTERN ) ) throw new MissingApiTokenException ( "Not a HEX value" ) ; }
Syntax checks the API Token .