Skip to content

Commit

Permalink
added files being worked on
Browse files Browse the repository at this point in the history
  • Loading branch information
Recks11 committed Mar 24, 2024
1 parent c4d0676 commit 54531ed
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package dev.rexijie.oauth.oauth2server.keys;

import com.nimbusds.jose.jwk.source.JWKSecurityContextJWKSet;

public class ApplicationKeySource extends JWKSecurityContextJWKSet {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package dev.rexijie.oauth.oauth2server.keys.context;

import com.nimbusds.jose.jwk.JWK;
import com.nimbusds.jose.proc.JWKSecurityContext;

import java.util.List;

public class KeyContext extends JWKSecurityContext {

/**
* Constructs a {@code JWKSecurityContext} with the provided
* parameters.
*
* @param keys The list of keys.
*/
public KeyContext(List<JWK> keys) {
super(keys);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ public CompositeTokenGranter(TokenServices tokenServices,
this.tokenGranterMap = Collections.synchronizedMap(Map.of(
AuthorizationGrantType.PASSWORD, new ResourceOwnerPasswordCredentialsTokenGranter(tokenServices, userAuthenticationManager),
AuthorizationGrantType.AUTHORIZATION_CODE, new AuthorizationCodeTokenGranter(tokenServices, authorizationCodeServices),
AuthorizationGrantType.CLIENT_CREDENTIALS, new ClientCredentialsTokenGranter(tokenServices, clientAuthenticationManager)
AuthorizationGrantType.CLIENT_CREDENTIALS, new ClientCredentialsTokenGranter(tokenServices, clientAuthenticationManager),
AuthorizationGrantType.REFRESH_TOKEN, new RefreshTokenGranter(tokenServices)
));
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package dev.rexijie.oauth.oauth2server.token.granter;

import dev.rexijie.oauth.oauth2server.api.domain.AuthorizationRequest;
import dev.rexijie.oauth.oauth2server.services.token.TokenServices;
import org.springframework.security.core.Authentication;
import org.springframework.security.oauth2.core.OAuth2Token;
import reactor.core.publisher.Mono;

// TODO (Implement)
public class RefreshTokenGranter implements TokenGranter {

public RefreshTokenGranter(TokenServices tokenServices) {

}

@Override
public Mono<AuthorizationRequest> validateRequest(Authentication authentication, AuthorizationRequest authorizationRequest) {
return null;
}

@Override
public Mono<OAuth2Token> grantToken(Authentication authentication, AuthorizationRequest authorizationRequest) {
return null;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package dev.rexijie.oauth.oauth2server.api.constants;

public interface Endpoints {
String OAUTH_BASE_PATH = "/oauth";
String OIDC_BASE = "/openid";
String API_BASE = "/api";
String CLIENT_API_BASE = "/clients";
String USER_API_BASE = "/users";
}

0 comments on commit 54531ed

Please sign in to comment.