Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Click on oidc provider link and perform authentication flow
[#115082069] https://www.pivotaltracker.com/story/show/115082069 Signed-off-by: Jeremy Coffield <jcoffield@pivotal.io> Signed-off-by: Madhura Bhave <mbhave@pivotal.io>
- Loading branch information
1 parent
9e2017a
commit 80a1d4e
Showing
22 changed files
with
859 additions
and
106 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
51 changes: 51 additions & 0 deletions
51
model/src/main/java/org/cloudfoundry/identity/uaa/provider/OidcAuthenticationFlow.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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,51 @@ | |||
/******************************************************************************* | |||
* Cloud Foundry | |||
* Copyright (c) [2009-2016] Pivotal Software, Inc. All Rights Reserved. | |||
* <p> | |||
* This product is licensed to you under the Apache License, Version 2.0 (the "License"). | |||
* You may not use this product except in compliance with the License. | |||
* <p> | |||
* This product includes a number of subcomponents with | |||
* separate copyright notices and license terms. Your use of these | |||
* subcomponents is subject to the terms and conditions of the | |||
* subcomponent's license, as noted in the LICENSE file. | |||
*******************************************************************************/ | |||
package org.cloudfoundry.identity.uaa.provider; | |||
|
|||
import com.fasterxml.jackson.annotation.JsonIgnore; | |||
import org.cloudfoundry.identity.uaa.constants.OriginKeys; | |||
|
|||
import java.net.URL; | |||
import java.util.Map; | |||
|
|||
public class OidcAuthenticationFlow implements XOAuthIdentityProviderDefinition.AuthenticationFlow { | |||
|
|||
private URL userInfoUrl; | |||
|
|||
@Override | |||
@JsonIgnore | |||
public String getType() { | |||
return OriginKeys.OIDC10; | |||
} | |||
|
|||
@Override | |||
@JsonIgnore | |||
public String getResponseType() { | |||
return "id_token"; | |||
} | |||
|
|||
@Override | |||
@JsonIgnore | |||
public String getTokenFromResponse(Map<String, String> responseBody) { | |||
return responseBody.get("id_token"); | |||
} | |||
|
|||
public OidcAuthenticationFlow setUserInfoUrl(URL userInfoUrl) { | |||
this.userInfoUrl = userInfoUrl; | |||
return this; | |||
} | |||
|
|||
public URL getUserInfoUrl() { | |||
return userInfoUrl; | |||
} | |||
} |
49 changes: 49 additions & 0 deletions
49
model/src/main/java/org/cloudfoundry/identity/uaa/provider/RawOauthAuthenticationFlow.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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,49 @@ | |||
package org.cloudfoundry.identity.uaa.provider; | |||
|
|||
import com.fasterxml.jackson.annotation.JsonIgnore; | |||
import org.cloudfoundry.identity.uaa.constants.OriginKeys; | |||
|
|||
import java.util.Map; | |||
|
|||
/******************************************************************************* | |||
* Cloud Foundry | |||
* Copyright (c) [2009-2016] Pivotal Software, Inc. All Rights Reserved. | |||
* <p> | |||
* This product is licensed to you under the Apache License, Version 2.0 (the "License"). | |||
* You may not use this product except in compliance with the License. | |||
* <p> | |||
* This product includes a number of subcomponents with | |||
* separate copyright notices and license terms. Your use of these | |||
* subcomponents is subject to the terms and conditions of the | |||
* subcomponent's license, as noted in the LICENSE file. | |||
*******************************************************************************/ | |||
public class RawOauthAuthenticationFlow implements XOAuthIdentityProviderDefinition.AuthenticationFlow { | |||
|
|||
@Override | |||
@JsonIgnore | |||
public String getType() { | |||
return OriginKeys.OAUTH20; | |||
} | |||
|
|||
@Override | |||
@JsonIgnore | |||
public String getResponseType() { | |||
return "token"; | |||
} | |||
|
|||
@Override | |||
@JsonIgnore | |||
public String getTokenFromResponse(Map<String, String> responseBody) { | |||
return responseBody.get("access_token"); | |||
} | |||
|
|||
private String ohmygodwhatever; | |||
|
|||
public String getOhmygodwhatever() { | |||
return ohmygodwhatever; | |||
} | |||
|
|||
public void setOhmygodwhatever(String ohmygodwhatever) { | |||
this.ohmygodwhatever = ohmygodwhatever; | |||
} | |||
} |
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
Oops, something went wrong.