-
-
Notifications
You must be signed in to change notification settings - Fork 177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: sso implementation #2523
base: sso
Are you sure you want to change the base?
feat: sso implementation #2523
Conversation
…n a JWT token for login.
… integrity exception.
…n that issued the sso provider
I have gone through all the change requests. I just have a question about the validation schema. I created On the weekend, I plan to write tests and documentation, so I hope it will be ready by Monday. |
yes, that's correct approach. |
) | ||
var customLogoUrl: String? = | ||
"https://user-images.githubusercontent.com/18496315/188628892-33fcc282-26f1-4035-8105-95952bd93de9.svg", | ||
"/favicon.svg", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should not be Tolgee Logo.
@@ -195,6 +195,26 @@ export const setTranslations = ( | |||
method: 'POST', | |||
}); | |||
|
|||
export const setSsoProvider = () => { | |||
const sql = `insert into ee.tenant (id, organization_id, domain, client_id, client_secret, authorization_uri, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why don't you create test data for this?
@@ -31,6 +35,22 @@ context('Login', () => { | |||
cy.gcy('global-language-menu').should('be.visible'); | |||
}); | |||
|
|||
context('Test Suite for SSO Login', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
context('Test Suite for SSO Login', () => { | |
context('SSO Login', () => { |
@@ -163,7 +152,7 @@ class OAuthService( | |||
domain = tenant.domain, | |||
organizationId = tenant.organizationId, | |||
) | |||
val user = oAuthUserHandler.findOrCreateUser(userData, invitationCode, tenant.domain) | |||
val user = oAuthUserHandler.findOrCreateUser(userData, invitationCode, "sso") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Search only for users with the same SSO domain.
val response = oAuthMultiTenantsMocks.authorize("registrationId") | ||
assertThat(response.response.status).isEqualTo(200) | ||
val result = jacksonObjectMapper().readValue(response.response.contentAsString, HashMap::class.java) | ||
Assertions.assertThat(result["accessToken"]).isNotNull |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use result["accessToken"].assert.isNotNull syntax
).thenReturn(defaultTokenResponse) | ||
).thenReturn(tokenResponse) | ||
|
||
// mock parsing of jwt | ||
mockJwk() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be called mockJwt
What I have done:
What I plan to add:
tbc