Skip to content

Commit 4639e47

Browse files
committed
Merge branch 'release/23.1.0'
2 parents 64641f5 + a6e0366 commit 4639e47

24 files changed

+655
-260
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
We follow the CalVer (https://calver.org/) versioning scheme: YY.MINOR.MICRO.
44

5+
23.1.0 (01-25-2023)
6+
===================
7+
8+
* Institution Rework Project - CAS Part
9+
510
22.1.3 (12-20-2022)
611
===================
712

src/main/java/io/cos/cas/osf/authentication/credential/OsfPostgresCredential.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public class OsfPostgresCredential extends RememberMeUsernamePasswordCredential
7272
/**
7373
* The user's institutional identity when authenticated via institutional SSO.
7474
*/
75-
private String institutionalIdentity = "";
75+
private String ssoIdentity = "";
7676

7777
/**
7878
* The authentication delegation protocol that is used between CAS / Shib and institutions.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
package io.cos.cas.osf.authentication.exception;
2+
3+
import lombok.NoArgsConstructor;
4+
5+
import javax.security.auth.login.AccountException;
6+
7+
/**
8+
* Describes an authentication error condition where institution SSO has failed
9+
* due to the OSF account is not active or not eligible for activation.
10+
*
11+
* @author Longze Chen
12+
* @since 23.1.0
13+
*/
14+
@NoArgsConstructor
15+
public class InstitutionSsoAccountInactiveException extends AccountException {
16+
17+
/**
18+
* Serialization metadata.
19+
*/
20+
private static final long serialVersionUID = -430454081442388569L;
21+
22+
/**
23+
* Instantiates a new {@link InstitutionSsoAccountInactiveException}.
24+
*
25+
* @param msg the msg
26+
*/
27+
public InstitutionSsoAccountInactiveException(final String msg) {
28+
super(msg);
29+
}
30+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
package io.cos.cas.osf.authentication.exception;
2+
3+
import lombok.NoArgsConstructor;
4+
5+
import javax.security.auth.login.AccountException;
6+
7+
/**
8+
* Describes an authentication error condition where institution SSO has failed
9+
* due to missing required attributes from IdP.
10+
*
11+
* @author Longze Chen
12+
* @since 23.1.0
13+
*/
14+
@NoArgsConstructor
15+
public class InstitutionSsoAttributeMissingException extends AccountException {
16+
17+
/**
18+
* Serialization metadata.
19+
*/
20+
private static final long serialVersionUID = 1412743002614665584L;
21+
22+
/**
23+
* Instantiates a new {@link InstitutionSsoAttributeMissingException}.
24+
*
25+
* @param msg the msg
26+
*/
27+
public InstitutionSsoAttributeMissingException(final String msg) {
28+
super(msg);
29+
}
30+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
package io.cos.cas.osf.authentication.exception;
2+
3+
import lombok.NoArgsConstructor;
4+
5+
import javax.security.auth.login.AccountException;
6+
7+
/**
8+
* Describes an authentication error condition where institution SSO has failed
9+
* due to attribute normalization or parsing failure.
10+
*
11+
* @author Longze Chen
12+
* @since 23.1.0
13+
*/
14+
@NoArgsConstructor
15+
public class InstitutionSsoAttributeParsingException extends AccountException {
16+
17+
/**
18+
* Serialization metadata.
19+
*/
20+
private static final long serialVersionUID = 4319114898092268727L;
21+
22+
/**
23+
* Instantiates a new {@link InstitutionSsoAttributeParsingException}.
24+
*
25+
* @param msg the msg
26+
*/
27+
public InstitutionSsoAttributeParsingException(final String msg) {
28+
super(msg);
29+
}
30+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
package io.cos.cas.osf.authentication.exception;
2+
3+
import lombok.NoArgsConstructor;
4+
5+
import javax.security.auth.login.AccountException;
6+
7+
/**
8+
* Describes an authentication error condition where institution SSO has failed
9+
* due to duplicate SSO identity.
10+
*
11+
* @author Longze Chen
12+
* @since 23.1.0
13+
*/
14+
@NoArgsConstructor
15+
public class InstitutionSsoDuplicateIdentityException extends AccountException {
16+
17+
/**
18+
* Serialization metadata.
19+
*/
20+
private static final long serialVersionUID = 1412743002614665584L;
21+
22+
/**
23+
* Instantiates a new {@link InstitutionSsoDuplicateIdentityException}.
24+
*
25+
* @param msg the msg
26+
*/
27+
public InstitutionSsoDuplicateIdentityException(final String msg) {
28+
super(msg);
29+
}
30+
}

src/main/java/io/cos/cas/osf/authentication/exception/InstitutionSsoFailedException.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
import javax.security.auth.login.AccountException;
66

77
/**
8-
* Describes an authentication error condition where institution SSO has failed.
8+
* Describes an authentication error condition where institution SSO has failed
9+
* in a way that doesn't fit into any specific exception.
910
*
1011
* @author Longze Chen
1112
* @since 21.0.0
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,26 @@
55
import javax.security.auth.login.AccountException;
66

77
/**
8-
* Describes an authentication error condition when connection failures and/or server errors happen between
9-
* CAS and OSF API during institution SSO.
8+
* Describes an authentication error condition when connection failures and/or server errors happen
9+
* between CAS and OSF API during institution SSO.
1010
*
1111
* @author Longze Chen
1212
* @since 22.1.3
1313
*/
1414
@NoArgsConstructor
15-
public class InstitutionSsoOsfApiFailureException extends AccountException {
15+
public class InstitutionSsoOsfApiFailedException extends AccountException {
1616

1717
/**
1818
* Serialization metadata.
1919
*/
2020
private static final long serialVersionUID = -620313210360224932L;
2121

2222
/**
23-
* Instantiates a new {@link InstitutionSsoOsfApiFailureException}.
23+
* Instantiates a new {@link InstitutionSsoOsfApiFailedException}.
2424
*
2525
* @param msg the msg
2626
*/
27-
public InstitutionSsoOsfApiFailureException(final String msg) {
27+
public InstitutionSsoOsfApiFailedException(final String msg) {
2828
super(msg);
2929
}
3030
}
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,26 @@
55
import javax.security.auth.login.AccountException;
66

77
/**
8-
* Describes an authentication error condition where user is not allowed to access OSF via institution SSO.
8+
* Describes an authentication error condition where user is not allowed to access OSF
9+
* via institution SSO due to Selective SSO rules.
910
*
1011
* @author Longze Chen
1112
* @since 22.0.1
1213
*/
1314
@NoArgsConstructor
14-
public class InstitutionSelectiveSsoFailedException extends AccountException {
15+
public class InstitutionSsoSelectiveLoginDeniedException extends AccountException {
1516

1617
/**
1718
* Serialization metadata.
1819
*/
1920
private static final long serialVersionUID = -7613915260905373074L;
2021

2122
/**
22-
* Instantiates a new {@link InstitutionSelectiveSsoFailedException}.
23+
* Instantiates a new {@link InstitutionSsoSelectiveLoginDeniedException}.
2324
*
2425
* @param msg the msg
2526
*/
26-
public InstitutionSelectiveSsoFailedException(final String msg) {
27+
public InstitutionSsoSelectiveLoginDeniedException(final String msg) {
2728
super(msg);
2829
}
2930
}

src/main/java/io/cos/cas/osf/authentication/support/OsfApiPermissionDenied.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ public enum OsfApiPermissionDenied {
1010

1111
DEFAULT("PermissionDenied"),
1212

13-
INSTITUTION_SELECTIVE_SSO_FAILURE("InstitutionSsoSelectiveNotAllowed");
13+
INSTITUTION_SSO_DUPLICATE_IDENTITY("InstitutionSsoDuplicateIdentity"),
14+
15+
INSTITUTION_SSO_ACCOUNT_INACTIVE("InstitutionSsoAccountInactive"),
16+
17+
INSTITUTION_SSO_SELECTIVE_LOGIN_DENIED("InstitutionSsoSelectiveLoginDenied");
1418

1519
private final String id;
1620

0 commit comments

Comments
 (0)