feat: 🎸 Allow prompts in oidc auth method form (#2007)
* feat: 🎸 Allow prompts in OIDC auth method form
This commit is contained in:
1 parent
02a89bd7ba
commit
3f2f2ba756
12 files changed
+115
-2
No files matched your search
@@ -158,6 +158,13 @@ export default class GeneratedAuthMethodModel extends BaseModel {
|
||||
})
|
||||
account_claim_maps;
|
||||
|
||||
@attr('string-array', {
|
||||
for: 'oidc',
|
||||
emptyArrayIfMissing: true,
|
||||
isNestedAttribute: true,
|
||||
})
|
||||
prompts;
|
||||
|
||||
// =attributes(ldap)
|
||||
|
||||
@attr('boolean', {
|
||||
|
||||
@@ -37,6 +37,7 @@ export const options = {
|
||||
account_claim_maps: {
|
||||
to: ['sub', 'name', 'email'],
|
||||
},
|
||||
prompts: ['none', 'consent', 'select_account', 'login'],
|
||||
},
|
||||
ldap: {
|
||||
account_attribute_maps: {
|
||||
|
||||
@@ -42,6 +42,7 @@ export default Factory.extend({
|
||||
signing_algorithms: ['RS256', 'RS384'],
|
||||
allowed_audiences: ['www.alice.com', 'www.alice.com/admin'],
|
||||
idp_ca_certs: ['certificate-1234', 'certificate-5678'],
|
||||
prompts: ['consent'],
|
||||
};
|
||||
break;
|
||||
case TYPE_AUTH_METHOD_LDAP:
|
||||
|
||||
@@ -165,6 +165,7 @@ module('Unit | Serializer | application', function (hooks) {
|
||||
dry_run: true,
|
||||
issuer: 'http://www.example.net',
|
||||
max_age: 500,
|
||||
prompts: [{ value: 'consent' }],
|
||||
});
|
||||
|
||||
let serializedRecord = record.serialize();
|
||||
@@ -186,6 +187,7 @@ module('Unit | Serializer | application', function (hooks) {
|
||||
dry_run: true,
|
||||
issuer: 'http://www.example.net',
|
||||
max_age: 500,
|
||||
prompts: ['consent'],
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
@@ -65,6 +65,7 @@ module('Unit | Serializer | auth method', function (hooks) {
|
||||
dry_run: true,
|
||||
issuer: 'http://www.example.net',
|
||||
max_age: 500,
|
||||
prompts: [{ value: 'none' }],
|
||||
});
|
||||
|
||||
let serializedRecord = record.serialize();
|
||||
@@ -86,6 +87,7 @@ module('Unit | Serializer | auth method', function (hooks) {
|
||||
dry_run: true,
|
||||
issuer: 'http://www.example.net',
|
||||
max_age: 500,
|
||||
prompts: ['none'],
|
||||
},
|
||||
});
|
||||
});
|
||||
@@ -180,6 +182,7 @@ module('Unit | Serializer | auth method', function (hooks) {
|
||||
dry_run: true,
|
||||
issuer: 'http://www.example.net',
|
||||
max_age: 500,
|
||||
prompts: [{ value: 'consent' }],
|
||||
});
|
||||
|
||||
let serializedRecord = record.serialize();
|
||||
@@ -200,6 +203,7 @@ module('Unit | Serializer | auth method', function (hooks) {
|
||||
dry_run: true,
|
||||
issuer: 'http://www.example.net',
|
||||
max_age: 500,
|
||||
prompts: ['consent'],
|
||||
},
|
||||
});
|
||||
});
|
||||
@@ -397,6 +401,7 @@ module('Unit | Serializer | auth method', function (hooks) {
|
||||
issuer: issuer,
|
||||
max_age: maxAge,
|
||||
client_secret: 'secret123',
|
||||
prompts: ['consent'],
|
||||
},
|
||||
version: 1,
|
||||
type: TYPE_AUTH_METHOD_OIDC,
|
||||
@@ -410,6 +415,7 @@ module('Unit | Serializer | auth method', function (hooks) {
|
||||
allowed_audiences,
|
||||
signing_algorithms,
|
||||
idp_ca_certs,
|
||||
prompts,
|
||||
} = record;
|
||||
assert.deepEqual(account_claim_maps, [
|
||||
{ from: 'from', to: 'to' },
|
||||
@@ -429,6 +435,7 @@ module('Unit | Serializer | auth method', function (hooks) {
|
||||
{ value: 'certificate-5678' },
|
||||
]);
|
||||
assert.strictEqual(record.api_url_prefix, apiUrlPrefix);
|
||||
assert.deepEqual(prompts, [{ value: 'consent' }]);
|
||||
assert.strictEqual(record.client_id, clientId);
|
||||
assert.strictEqual(
|
||||
record.disable_discovered_config_validation,
|
||||
|
||||
Reference in new issue
Block a user