AuthorizationHeaderCredential rename to AuthorizationHeader

This commit is contained in:
MaxKey
2023-03-07 10:05:18 +08:00
parent 6a534e9f67
commit b34063de10
7 changed files with 21 additions and 21 deletions

View File

@@ -27,7 +27,7 @@ import org.maxkey.authz.oauth2.common.exceptions.OAuth2Exception;
import org.maxkey.authz.oauth2.provider.ClientDetailsService;
import org.maxkey.authz.oauth2.provider.OAuth2Authentication;
import org.maxkey.authz.oauth2.provider.token.DefaultTokenServices;
import org.maxkey.util.AuthorizationHeaderCredential;
import org.maxkey.util.AuthorizationHeader;
import org.maxkey.util.JsonUtils;
import org.maxkey.util.RequestTokenUtils;
import org.maxkey.web.HttpResponseAdapter;
@@ -91,7 +91,7 @@ public class IntrospectEndpoint {
httpResponseAdapter.write(response,JsonUtils.gsonToString(introspection),"json");
}
public boolean clientAuthenticate(AuthorizationHeaderCredential headerCredential) {
public boolean clientAuthenticate(AuthorizationHeader headerCredential) {
if(headerCredential != null){
UsernamePasswordAuthenticationToken authenticationToken = null;
if(headerCredential.isBasic()) {

View File

@@ -39,7 +39,7 @@ import org.maxkey.authz.oauth2.provider.AuthorizationRequest;
import org.maxkey.authz.oauth2.provider.OAuth2Authentication;
import org.maxkey.authz.oauth2.provider.OAuth2Request;
import org.maxkey.authz.oauth2.provider.OAuth2RequestFactory;
import org.maxkey.util.AuthorizationHeaderCredential;
import org.maxkey.util.AuthorizationHeader;
import org.maxkey.util.AuthorizationHeaderUtils;
import org.maxkey.web.WebContext;
import org.slf4j.Logger;
@@ -238,7 +238,7 @@ public class TokenEndpointAuthenticationFilter implements Filter {
if(clientId == null) {
//for header authorization basic
String authorization_bearer =request.getHeader("authorization");
AuthorizationHeaderCredential ahc=AuthorizationHeaderUtils.resolve(authorization_bearer);
AuthorizationHeader ahc=AuthorizationHeaderUtils.resolve(authorization_bearer);
clientId =ahc.getUsername();
clientSecret=ahc.getCredential();
}