Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Fixed

- Renamed the misspelled `startAuthenticationWorflow()` provider method to `startAuthenticationWorkflow()`. The old name remains as a deprecated alias on `BaseProvider`, and the `start` handler falls back to it for custom providers that only implement the old name.

## [3.0.0] - 2026-08-26

## [3.0.0] - 2026-08-25
Expand Down
7 changes: 6 additions & 1 deletion handlers/Auth.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,12 @@ component {
}

function start( event, rc, prc ){
relocate( url = prc.ssoProvider.startAuthenticationWorflow( event ) );
// Fall back to the deprecated misspelled method for custom providers written against cbSSO <= 3.0
if ( structKeyExists( prc.ssoProvider, "startAuthenticationWorkflow" ) ) {
relocate( url = prc.ssoProvider.startAuthenticationWorkflow( event ) );
} else {
relocate( url = prc.ssoProvider.startAuthenticationWorflow( event ) );
Comment on lines +27 to +30
}
}

function authorize( event, rc, prc ){
Expand Down
2 changes: 1 addition & 1 deletion models/ISSOIntegrationProvider.cfc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
interface {

public string function getName();
public string function startAuthenticationWorflow( required any event );
public string function startAuthenticationWorkflow( required any event );
public any function processAuthorizationEvent( required any event );

}
7 changes: 7 additions & 0 deletions models/providers/BaseProvider.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,11 @@ component {
return "#event.getHTMLBaseURL()#cbsso/auth/#variables.name.lcase()#";
}

/**
* @deprecated Misspelled alias kept for backward compatibility. Use startAuthenticationWorkflow() instead. Will be removed in the next major release.
*/
public string function startAuthenticationWorflow( required any event ){
return startAuthenticationWorkflow( arguments.event );
}

}
2 changes: 1 addition & 1 deletion models/providers/FacebookProvider.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ component
return variables.name;
}

public string function startAuthenticationWorflow( required any event ){
public string function startAuthenticationWorkflow( required any event ){
return oAuthService.buildAuthUrl(
authEndpoint = getAuthEndpoint(),
client_id = getClientId(),
Expand Down
2 changes: 1 addition & 1 deletion models/providers/GitHubProvider.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ component
return variables.name;
}

public string function startAuthenticationWorflow( required any event ){
public string function startAuthenticationWorkflow( required any event ){
return oAuthService.buildAuthUrl(
authEndpoint = getAuthEndpoint(),
client_id = getClientId(),
Expand Down
2 changes: 1 addition & 1 deletion models/providers/GoogleProvider.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ component
return variables.name;
}

public string function startAuthenticationWorflow( required any event ){
public string function startAuthenticationWorkflow( required any event ){
return oAuthService.buildAuthUrl(
authEndpoint = getAuthEndpoint(),
client_id = getClientId(),
Expand Down
2 changes: 1 addition & 1 deletion models/providers/MicrosoftSAMLProvider.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ component
return this;
}

public string function startAuthenticationWorflow( required any event ){
public string function startAuthenticationWorkflow( required any event ){
var encoded = encodeForURL( deflateAndBase64Enocde( getRawSAMLRequest() ) );

return "#variables.authEndpoint#?SAMLRequest=#encoded#";
Expand Down
9 changes: 8 additions & 1 deletion test-harness/models/CustomProvider.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ component implements="cbsso.models.ISSOIntegrationProvider" {
return "";
}

public string function startAuthenticationWorflow( required any event ){
public string function startAuthenticationWorkflow( required any event ){
return "http://" & cgi.HTTP_HOST & "/main/fakeIdentityProvider";
}

Expand All @@ -26,4 +26,11 @@ component implements="cbsso.models.ISSOIntegrationProvider" {
.setUserId( "user-456" );
}

/**
* @deprecated Misspelled alias kept for backward compatibility. Use startAuthenticationWorkflow() instead. Will be removed in the next major release.
*/
public string function startAuthenticationWorflow( required any event ){
return startAuthenticationWorkflow( arguments.event );
}

}
10 changes: 10 additions & 0 deletions test-harness/tests/specs/AuthHandlerSpec.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,16 @@ component extends="coldbox.system.testing.BaseTestCase" {
expect( event.getValue( "relocate_URL", "" ) ).toInclude( "/main/fakeIdentityProvider" );
} );

it( "keeps the deprecated startAuthenticationWorflow alias working on providers", function(){
var provider = getInstance( "CustomProvider" );
expect( provider.startAuthenticationWorflow( getRequestContext() ) ).toBe(
provider.startAuthenticationWorkflow( getRequestContext() )
Comment on lines +62 to +65
);
var google = getInstance( "GoogleProvider@cbsso" );
expect( structKeyExists( google, "startAuthenticationWorkflow" ) ).toBeTrue();
expect( structKeyExists( google, "startAuthenticationWorflow" ) ).toBeTrue();
} );

it( "does not announce CBSSOAuthorization for a missing provider", function(){
execute( route = "/cbsso/auth/notaprovider", renderResults = false );

Expand Down