c# - Dotnetopenauth : validate a token without catching ProtocolFaultResponseException -


i'm implementing service presence (an validity) of oauth2 token. using following code

try {     token = server.getaccesstoken();      //do token expiration validation , scope verifications  } catch (protocolfaultresponseexception ex) {     //process exception } 

is there better way catching exception test presence of token (something trygetaccesstoken) ?

thanks


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -