git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/Common/authorization-common-client@132580 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
e8c2aa92f1
commit
5ac0bf67d1
|
@ -23,7 +23,8 @@ public class Utils {
|
|||
|
||||
public static int getInfrastructureHashFromToken(String token, String defaultInfrastructureToUse) {
|
||||
if (token==null) throw new RuntimeException("token required for this method");
|
||||
else if (token.matches(NEW_TOKEN_REGEXPR)){
|
||||
|
||||
if (token.matches(NEW_TOKEN_REGEXPR)){
|
||||
String hashCodeAsString = token.substring(token.lastIndexOf("-")+1, token.length());
|
||||
return Integer.parseInt(hashCodeAsString);
|
||||
} else if (token.matches(OLD_TOKEN_REGEXPR))
|
||||
|
|
Loading…
Reference in New Issue