-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Custom user attributes mapping WIP. Need to deal with some casting issues.
- Loading branch information
Bill Smith
committed
Jan 25, 2019
1 parent
d6ff6dd
commit 29d948d
Showing
5 changed files
with
67 additions
and
19 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
26 changes: 26 additions & 0 deletions
26
pac4j-module/src/main/java/net/unicon/shibui/pac4j/CustomPropertiesConfiguration.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,26 @@ | ||
package net.unicon.shibui.pac4j; | ||
|
||
import org.springframework.boot.context.properties.ConfigurationProperties; | ||
import org.springframework.context.annotation.Configuration; | ||
import org.springframework.stereotype.Component; | ||
|
||
import java.util.HashMap; | ||
import java.util.Map; | ||
|
||
/** | ||
* @author Bill Smith (wsmith@unicon.net) | ||
*/ | ||
@Component | ||
@ConfigurationProperties(prefix="custom") | ||
public class CustomPropertiesConfiguration { | ||
|
||
private Map<String, String> saml2ProfileMapping; | ||
|
||
public Map<String, String> getSaml2ProfileMapping() { | ||
return saml2ProfileMapping; | ||
} | ||
|
||
public void setSaml2ProfileMapping(Map<String, String> saml2ProfileMapping) { | ||
this.saml2ProfileMapping = saml2ProfileMapping; | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ | ||
net.unicon.shibui.pac4j.Pac4jConfiguration,\ | ||
net.unicon.shibui.pac4j.WebSecurity,\ | ||
net.unicon.shibui.pac4j.Pac4jConfigurationProperties | ||
net.unicon.shibui.pac4j.Pac4jConfigurationProperties,\ | ||
net.unicon.shibui.pac4j.CustomPropertiesConfiguration |
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,6 @@ | ||
custom: | ||
saml2ProfileMapping: | ||
username: urn:oid:0.9.2342.19200300.100.1.3 | ||
firstname: givenName | ||
lastname: sn | ||
email: mail |