77)
88
99func TestGenerateSignInUriShouldGenerateCorrectUri (t * testing.T ) {
10- testSignInUri := "https://example.com/authorize?client_id=clientId&code_challenge=codeChallenge&code_challenge_method=S256&prompt=login&redirect_uri=https://example .com/callback &resource=resourceA&resource=resourceB&response_type=code&scope=openid offline_access profile&state=state"
10+ testSignInUri := "https://example.com/authorize?client_id=clientId&code_challenge=codeChallenge&code_challenge_method=S256&prompt=login&redirect_uri=https%3A%2F%2Fexample .com%2Fcallback &resource=resourceA&resource=resourceB&response_type=code&scope=openid+ offline_access+ profile&state=state"
1111
1212 signInUri , generateSignInUriErr := GenerateSignInUri (& SignInUriGenerationOptions {
1313 AuthorizationEndpoint : "https://example.com/authorize" ,
@@ -25,7 +25,7 @@ func TestGenerateSignInUriShouldGenerateCorrectUri(t *testing.T) {
2525}
2626
2727func TestGenerateSignInUriShouldContainReservedScopesByDefault (t * testing.T ) {
28- testSignInUri := "https://example.com/authorize?client_id=clientId&code_challenge=codeChallenge&code_challenge_method=S256&prompt=consent&redirect_uri=https://example .com/callback &resource=resourceA&resource=resourceB&response_type=code&scope=openid offline_access profile&state=state"
28+ testSignInUri := "https://example.com/authorize?client_id=clientId&code_challenge=codeChallenge&code_challenge_method=S256&prompt=consent&redirect_uri=https%3A%2F%2Fexample .com%2Fcallback &resource=resourceA&resource=resourceB&response_type=code&scope=openid+ offline_access+ profile&state=state"
2929
3030 signInUri , generateSignInUriErr := GenerateSignInUri (& SignInUriGenerationOptions {
3131 AuthorizationEndpoint : "https://example.com/authorize" ,
@@ -42,7 +42,7 @@ func TestGenerateSignInUriShouldContainReservedScopesByDefault(t *testing.T) {
4242}
4343
4444func TestGenerateSignInUriShouldContainReservedScopesAndExtraScopes (t * testing.T ) {
45- testSignInUri := "https://example.com/authorize?client_id=clientId&code_challenge=codeChallenge&code_challenge_method=S256&prompt=consent&redirect_uri=https://example .com/callback &resource=resourceA&resource=resourceB&response_type=code&scope=openid offline_access profile extra_scope&state=state"
45+ testSignInUri := "https://example.com/authorize?client_id=clientId&code_challenge=codeChallenge&code_challenge_method=S256&prompt=consent&redirect_uri=https%3A%2F%2Fexample .com%2Fcallback &resource=resourceA&resource=resourceB&response_type=code&scope=openid+ offline_access+ profile+ extra_scope&state=state"
4646
4747 signInUri , generateSignInUriErr := GenerateSignInUri (& SignInUriGenerationOptions {
4848 AuthorizationEndpoint : "https://example.com/authorize" ,
@@ -60,7 +60,7 @@ func TestGenerateSignInUriShouldContainReservedScopesAndExtraScopes(t *testing.T
6060}
6161
6262func TestGenerateSignInUriShouldGenerateUriWithConsentAsThePromptValue (t * testing.T ) {
63- testSignInUri := "https://example.com/authorize?client_id=clientId&code_challenge=codeChallenge&code_challenge_method=S256&prompt=consent&redirect_uri=https://example .com/callback &resource=resourceA&resource=resourceB&response_type=code&scope=openid offline_access profile&state=state"
63+ testSignInUri := "https://example.com/authorize?client_id=clientId&code_challenge=codeChallenge&code_challenge_method=S256&prompt=consent&redirect_uri=https%3A%2F%2Fexample .com%2Fcallback &resource=resourceA&resource=resourceB&response_type=code&scope=openid+ offline_access+ profile&state=state"
6464
6565 signInUri , generateSignInUriErr := GenerateSignInUri (& SignInUriGenerationOptions {
6666 AuthorizationEndpoint : "https://example.com/authorize" ,
@@ -77,7 +77,7 @@ func TestGenerateSignInUriShouldGenerateUriWithConsentAsThePromptValue(t *testin
7777}
7878
7979func TestGenerateSignInUriShouldNotContainResourcesIfNoResourcesAreProvided (t * testing.T ) {
80- testSignInUri := "https://example.com/authorize?client_id=clientId&code_challenge=codeChallenge&code_challenge_method=S256&prompt=consent&redirect_uri=https://example .com/callback &response_type=code&scope=openid offline_access profile&state=state"
80+ testSignInUri := "https://example.com/authorize?client_id=clientId&code_challenge=codeChallenge&code_challenge_method=S256&prompt=consent&redirect_uri=https%3A%2F%2Fexample .com%2Fcallback &response_type=code&scope=openid+ offline_access+ profile&state=state"
8181
8282 signInUri , generateSignInUriErr := GenerateSignInUri (& SignInUriGenerationOptions {
8383 AuthorizationEndpoint : "https://example.com/authorize" ,
0 commit comments