This repository has been archived by the owner on Dec 12, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 155
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
penid-connect-new-OAuthPolicy-fields Review Comments
- Loading branch information
Showing
6 changed files
with
144 additions
and
13 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
api/src/main/java/com/stormpath/sdk/oauth/OAuthPolicies.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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* Copyright 2013 Stormpath, Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package com.stormpath.sdk.oauth; | ||
|
||
import com.stormpath.sdk.lang.Classes; | ||
|
||
/** | ||
* @since 1.6.0 | ||
*/ | ||
public final class OAuthPolicies { | ||
|
||
public static OAuthPolicyOptions options() { | ||
return (OAuthPolicyOptions) Classes.newInstance("com.stormpath.sdk.impl.oauth.DefaultOAuthPolicyOptions"); | ||
} | ||
} |
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
30 changes: 30 additions & 0 deletions
30
api/src/main/java/com/stormpath/sdk/oauth/OAuthPolicyOptions.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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
* Copyright 2017 Stormpath, Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package com.stormpath.sdk.oauth; | ||
|
||
import com.stormpath.sdk.query.Options; | ||
|
||
/** | ||
* @since 1.6.0 | ||
*/ | ||
public interface OAuthPolicyOptions<T> extends Options { | ||
|
||
T withScopes(); | ||
|
||
T withScopes(int limit); | ||
|
||
T withScopes(int limit, int offset); | ||
} |
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
39 changes: 39 additions & 0 deletions
39
impl/src/main/java/com/stormpath/sdk/impl/oauth/DefaultOAuthPolicyOptions.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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* | ||
* Copyright 2017 Stormpath, Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package com.stormpath.sdk.impl.oauth; | ||
|
||
import com.stormpath.sdk.impl.query.DefaultOptions; | ||
import com.stormpath.sdk.oauth.OAuthPolicyOptions; | ||
|
||
/** | ||
* @since 1.6.0 | ||
*/ | ||
public class DefaultOAuthPolicyOptions extends DefaultOptions<OAuthPolicyOptions> implements OAuthPolicyOptions<OAuthPolicyOptions>{ | ||
@Override | ||
public OAuthPolicyOptions withScopes() { | ||
return expand(DefaultOAuthPolicy.SCOPES); | ||
} | ||
|
||
@Override | ||
public OAuthPolicyOptions withScopes(int limit) { | ||
return expand(DefaultOAuthPolicy.SCOPES, limit); | ||
} | ||
|
||
@Override | ||
public OAuthPolicyOptions withScopes(int limit, int offset) { | ||
return expand(DefaultOAuthPolicy.SCOPES, limit, offset); | ||
} | ||
} |