This repository has been archived by the owner on May 31, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SECOAUTH-154: added rough draft of implicit token provider on client
- Loading branch information
Showing
28 changed files
with
604 additions
and
282 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 11 additions & 44 deletions
55
...src/main/java/org/springframework/security/oauth2/client/context/OAuth2ClientContext.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,25 @@ | ||
package org.springframework.security.oauth2.client.context; | ||
|
||
import org.springframework.security.oauth2.client.resource.OAuth2ProtectedResourceDetails; | ||
import org.springframework.security.oauth2.common.OAuth2AccessToken; | ||
|
||
import java.util.Map; | ||
|
||
import org.springframework.security.oauth2.common.OAuth2AccessToken; | ||
|
||
/** | ||
* The OAuth 2 security context (for a specific user). | ||
* | ||
* @author Ryan Heaton | ||
* @author Dave Syer | ||
*/ | ||
public interface OAuth2ClientContext { | ||
|
||
/** | ||
* Get the access tokens for the current context. | ||
* | ||
* @return The access tokens for the current context. The key to the map is the {@link OAuth2ProtectedResourceDetails#getId() id of the protected resource} | ||
* for which the access token is valid. | ||
*/ | ||
Map<String, OAuth2AccessToken> getAccessTokens(); | ||
|
||
/** | ||
* Get the state that has been preserved for the current context. | ||
* | ||
* @return the state that has been preserved for the current context. | ||
*/ | ||
Object getPreservedState(); | ||
public class OAuth2ClientContext { | ||
|
||
/** | ||
* The URI to which a user is to be redirected after authorizing an access token request for this context. | ||
* | ||
* @return The URI to which a user is to be redirected after authorizing an access token request for this context. | ||
*/ | ||
String getUserAuthorizationRedirectUri(); | ||
private Map<String, OAuth2AccessToken> accessTokens; | ||
|
||
/** | ||
* The authorization code for this context. | ||
* | ||
* @return The authorization code, or null if none. | ||
*/ | ||
// TODO: this is an implementation detail (only for authorization code grant types)? | ||
String getAuthorizationCode(); | ||
public Map<String, OAuth2AccessToken> getAccessTokens() { | ||
return accessTokens; | ||
} | ||
|
||
/** | ||
* Any details for this security this context. | ||
* | ||
* @return Any details for this security context. | ||
*/ | ||
Object getDetails(); | ||
public void setAccessTokens(Map<String, OAuth2AccessToken> accessTokens) { | ||
this.accessTokens = accessTokens; | ||
} | ||
|
||
/** | ||
* The error parameters associated with this context. | ||
* | ||
* @return The error parameters associated with this context. | ||
*/ | ||
Map<String, String> getErrorParameters(); | ||
} |
Oops, something went wrong.