Added NonceReuseException

pull/263/head
Amanda Anganes 2012-12-27 10:53:00 -05:00
parent 8f8a3754db
commit e1dffb959c
1 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1,15 @@
package org.mitre.oauth2.exception;
import org.mitre.openid.connect.model.Nonce;
import org.springframework.security.oauth2.common.exceptions.OAuth2Exception;
public class NonceReuseException extends OAuth2Exception {
private static final long serialVersionUID = 1L;
public NonceReuseException(String clientId, Nonce alreadyUsed) {
super("Client " + clientId + " attempted to use nonce " + alreadyUsed.getValue() + " which was used previously at "
+ alreadyUsed.getUseDate().toString() + " and expires at " + alreadyUsed.getExpireDate());
}
}