private void parseAuthentication ( Intent data ) { String idToken = data . getStringExtra ( Constants . ID_TOKEN_EXTRA ) ; String accessToken = data . getStringExtra ( Constants . ACCESS_TOKEN_EXTRA ) ; String tokenType = data . getStringExtra ( Constants . TOKEN_TYPE_EXTRA ) ; String refreshToken = data . getStringExtra ( Constants . REFRESH_TOKEN_EXTRA ) ; long expiresIn = data . getLongExtra ( Constants . EXPIRES_IN_EXTRA , 0 ) ; Credentials credentials = new Credentials ( idToken , accessToken , tokenType , refreshToken , expiresIn ) ; Log . d ( TAG , "User authenticated!" ) ; onAuthentication ( credentials ) ; }
Extracts the Authentication data from the intent data .