private Identity identity ( final String tkn ) throws IOException { return parse ( this . user . uri ( ) . set ( URI . create ( new Href ( PsTwitter . VERIFY_URL ) . with ( PsTwitter . ACCESS_TOKEN , tkn ) . toString ( ) ) ) . back ( ) . header ( "accept" , "application/json" ) . fetch ( ) . as ( RestResponse . class ) . assertStatus ( HttpURLConnection . HTTP_OK ) . as ( JsonResponse . class ) . json ( ) . readObject ( ) ) ; }
Get user name from Twitter with the token provided .