Auto-generated method stub

This commit is contained in:
MaxKey
2021-11-09 22:44:35 +08:00
parent 86aa0f9ed9
commit 899d7b75f5
120 changed files with 180 additions and 226 deletions
@@ -55,7 +55,6 @@ public abstract class AbstractAuthorizeAdapter {
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
_logger.debug("Token : "+data);
@@ -101,8 +101,6 @@ renew [OPTIONAL] - if this parameter is set, ticket validation will only succeed
try {
storedTicket = ticketServices.consumeTicket(ticket);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
_logger.error("consume Ticket error " , e);
}
@@ -195,7 +195,6 @@ For all error codes, it is RECOMMENDED that CAS provide a more detailed message
try {
storedTicket = ticketServices.consumeTicket(ticket);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
@@ -78,7 +78,6 @@ public class Cas30AuthorizeEndpoint extends CasBaseAuthorizeEndpoint{
try {
storedTicket = ticketServices.consumeTicket(ticket);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
@@ -128,7 +128,6 @@ public class CasRestV1Endpoint extends CasBaseAuthorizeEndpoint{
return new ResponseEntity<>(ticket, HttpStatus.OK);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return new ResponseEntity<>("", HttpStatus.BAD_REQUEST);
@@ -147,7 +146,6 @@ public class CasRestV1Endpoint extends CasBaseAuthorizeEndpoint{
return new ResponseEntity<>("", HttpStatus.OK);
}
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return new ResponseEntity<>("", HttpStatus.NOT_FOUND);
@@ -167,7 +165,6 @@ public class CasRestV1Endpoint extends CasBaseAuthorizeEndpoint{
return new ResponseEntity<>("", HttpStatus.OK);
}
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return new ResponseEntity<>("", HttpStatus.NOT_FOUND);
@@ -149,13 +149,11 @@ public abstract class AbstractTicket implements Ticket {
@Override
public AppsCasDetails getCasDetails() {
// TODO Auto-generated method stub
return this.casDetails;
}
@Override
public Authentication getAuthentication() {
// TODO Auto-generated method stub
return this.authentication;
}
@@ -115,20 +115,17 @@ public class ServiceTicketImpl extends AbstractTicket implements ServiceTicket{
@Override
public Service getService() {
// TODO Auto-generated method stub
return null;
}
@Override
public boolean isFromNewLogin() {
// TODO Auto-generated method stub
return false;
}
@Override
public ProxyGrantingTicket grantProxyGrantingTicket(String id, Authentication authentication,
ExpirationPolicy expirationPolicy) throws Exception {
// TODO Auto-generated method stub
return null;
}
@@ -166,37 +166,31 @@ public class TicketGrantingTicketImpl extends AbstractTicket implements TicketGr
@Override
public Map<String, Service> getServices() {
// TODO Auto-generated method stub
return null;
}
@Override
public Map<String, Service> getProxyGrantingTickets() {
// TODO Auto-generated method stub
return null;
}
@Override
public Service getProxiedBy() {
// TODO Auto-generated method stub
return null;
}
@Override
public boolean isRoot() {
// TODO Auto-generated method stub
return false;
}
@Override
public TicketGrantingTicket getRoot() {
// TODO Auto-generated method stub
return null;
}
@Override
public List<Authentication> getChainedAuthentications() {
// TODO Auto-generated method stub
return null;
}
@@ -48,7 +48,6 @@ public class InMemoryProxyGrantingTicketServices extends RandomServiceTicketServ
@Override
public Ticket get(String ticket) {
// TODO Auto-generated method stub
return casTicketStore.getIfPresent(ticket);
}
@@ -48,8 +48,7 @@ public class InMemoryTicketServices extends RandomServiceTicketServices {
@Override
public Ticket get(String ticket) {
// TODO Auto-generated method stub
return null;
return casTicketStore.getIfPresent(ticket);
}
}
@@ -83,7 +83,6 @@ public class CasAutoConfiguration implements InitializingBean {
@Override
public void afterPropertiesSet() throws Exception {
// TODO Auto-generated method stub
}
}
@@ -21,7 +21,6 @@ import org.maxkey.authz.cas.endpoint.ticket.generator.DefaultUniqueTicketIdGener
public class DefaultUniqueTicketIdGeneratorTest {
public static void main(String[] args) {
// TODO Auto-generated method stub
DefaultUniqueTicketIdGenerator t=new DefaultUniqueTicketIdGenerator();
System.out.println(t.getNewTicketId("ST"));
}
@@ -22,11 +22,9 @@ import org.maxkey.authz.cas.endpoint.ticket.generator.InetAddressUtils;
public class InetAddressUtilsTest {
public InetAddressUtilsTest() {
// TODO Auto-generated constructor stub
}
public static void main(String[] args) {
// TODO Auto-generated method stub
System.out.println(InetAddressUtils.getCasServerHostName());
}
@@ -26,11 +26,9 @@ import org.maxkey.pretty.impl.XmlPretty;
public class ServiceResponseBuilderTest {
public ServiceResponseBuilderTest() {
// TODO Auto-generated constructor stub
}
public static void main(String[] args) throws Exception {
// TODO Auto-generated method stub
ServiceResponseBuilder srbJson=new ServiceResponseBuilder();
srbJson.success()
.setUser("shi")
@@ -36,7 +36,6 @@ public class FormBasedDefaultAdapter extends AbstractAuthorizeAdapter {
@Override
public String encrypt(String data, String algorithmKey, String algorithm) {
// TODO Auto-generated method stub
return null;
}
@@ -33,7 +33,6 @@ public class FormBasedNetease163EmailAdapter extends AbstractAuthorizeAdapter {
@Override
public String encrypt(String data, String algorithmKey, String algorithm) {
// TODO Auto-generated method stub
return null;
}
@@ -35,7 +35,6 @@ public class FormBasedNeteaseNoteYoudaoAdapter extends AbstractAuthorizeAdapter
@Override
public String encrypt(String data, String algorithmKey, String algorithm) {
// TODO Auto-generated method stub
return null;
}
@@ -37,7 +37,6 @@ public class FormBasedRedirectAdapter extends AbstractAuthorizeAdapter {
@Override
public String encrypt(String data, String algorithmKey, String algorithm) {
// TODO Auto-generated method stub
return null;
}
@@ -60,7 +60,7 @@ public final class OAuth2AccessTokenJackson2Deserializer extends StdDeserializer
Set<String> scope = null;
Map<String, Object> additionalInformation = new LinkedHashMap<String, Object>();
// TODO What should occur if a parameter exists twice
// What should occur if a parameter exists twice
while (jp.nextToken() != JsonToken.END_OBJECT) {
String name = jp.getCurrentName();
jp.nextToken();
@@ -88,7 +88,7 @@ public final class OAuth2AccessTokenJackson2Deserializer extends StdDeserializer
}
}
// TODO What should occur if a required parameter (tokenValue or tokenType) is missing?
// What should occur if a required parameter (tokenValue or tokenType) is missing?
DefaultOAuth2AccessToken accessToken = new DefaultOAuth2AccessToken(tokenValue);
accessToken.setTokenType(tokenType);
@@ -50,7 +50,7 @@ public class JwtHelper {
throw new IllegalArgumentException("JWT must have 3 tokens");
}
CharBuffer buffer = CharBuffer.wrap(token, 0, firstPeriod);
// TODO: Use a Reader which supports CharBuffer
// Use a Reader which supports CharBuffer
JwtHeader header = JwtHeaderHelper.create(buffer.toString());
buffer.limit(lastPeriod).position(firstPeriod + 1);
@@ -54,7 +54,7 @@ public interface OAuth2RequestFactory {
/**
* Create a new {@link OAuth2Request} by extracting the needed information from the current {@link TokenRequest}
* object.
* @param client TODO
* @param client
* @param tokenRequest the request to be converted
*
* @return am immutable object for storage
@@ -126,7 +126,7 @@ public class JdbcClientDetailsService implements ClientDetailsService, ClientReg
}
public ClientDetails loadClientByClientId(String clientId) {
//TODO: cache in memory
// cache in memory
ClientDetails details = clientDetailsCache.getIfPresent(clientId);
if(details == null) {
try {
@@ -188,7 +188,7 @@ public class AuthorizationEndpoint extends AbstractEndpoint {
// such logic here, and set the approved flag on the authorization request accordingly.
authorizationRequest = userApprovalHandler.checkForPreApproval(authorizationRequest,
(Authentication) principal);
// TODO: is this call necessary?
// is this call necessary?
boolean approved = userApprovalHandler.isApproved(authorizationRequest, (Authentication) principal);
authorizationRequest.setApproved(approved);
@@ -331,7 +331,7 @@ public class AuthorizationEndpoint extends AbstractEndpoint {
return accessToken;
}
//TODO: Authorization Code Response
// Authorization Code Response
private View getAuthorizationCodeResponse(AuthorizationRequest authorizationRequest, Authentication authUser) {
try {
return new RedirectView(getSuccessfulRedirect(authorizationRequest,
@@ -419,7 +419,7 @@ public class AuthorizationEndpoint extends AbstractEndpoint {
}
}
//TODO: Successful Redirect
// Successful Redirect
private String getSuccessfulRedirect(AuthorizationRequest authorizationRequest, String authorizationCode) {
if (authorizationCode == null) {
@@ -56,13 +56,12 @@ public class OAuthDefaultUserInfoAdapter extends AbstractAuthorizeAdapter {
@Override
public String encrypt(String data, String algorithmKey, String algorithm) {
// TODO Auto-generated method stub
return null;
}
@Override
public ModelAndView authorize(UserInfo userInfo, Object app, String data,ModelAndView modelAndView) {
// TODO Auto-generated method stub
return null;
}
@@ -125,7 +125,7 @@ public class OIDCIdTokenEnhancer implements TokenEnhancer {
// if the auth time claim was explicitly requested OR if the client always wants the auth time, put it in
if (request.getExtensions().containsKey("max_age")
|| (request.getExtensions().containsKey("idtoken")) // TODO: parse the ID Token claims (#473) -- for now assume it could be in there
|| (request.getExtensions().containsKey("idtoken")) // parse the ID Token claims (#473) -- for now assume it could be in there
) {
DateTime loginDate=DateTime.parse(WebContext.getUserInfo().getLastLoginTime(), DateTimeFormat.forPattern("yyyy-MM-dd HH:mm:ss"));
builder.claim("auth_time", loginDate.getMillis()/ 1000);
@@ -339,7 +339,6 @@ public class Oauth20AutoConfiguration implements InitializingBean {
@Override
public void afterPropertiesSet() throws Exception {
// TODO Auto-generated method stub
}
}
@@ -86,7 +86,7 @@ public class SignatureSecurityPolicyRule implements InitializingBean, SecurityP
}
SignableSAMLObject samlMessage = (SignableSAMLObject) messageContext.getInboundMessage();
//TODO:POST NEED Signed,but some is not
//POST NEED Signed,but some is not
if( !samlMessage.isSigned()) {
logger.debug("evaluating signature POST NEED Signed,but some is not.");
throw new SecurityPolicyException("InboundMessage was not signed.");
@@ -139,7 +139,6 @@ public class ExtractPostBindingAdapter implements ExtractBindingAdapter, Initial
@Override
public void afterPropertiesSet() throws Exception {
// TODO Auto-generated method stub
}
@@ -227,7 +227,6 @@ public class ConsumerEndpoint {
// 1. 获取 sp keyStore
AppsSAML20Details saml20Details = saml20DetailsService.get(spId);
if (saml20Details == null) {
// TODO
logger.error("spid[" + spId + "] not exists");
throw new Exception();
}
@@ -334,7 +334,6 @@ public class Saml20AutoConfiguration implements InitializingBean {
@Override
public void afterPropertiesSet() throws Exception {
// TODO Auto-generated method stub
}
}