Commit 722bf99a authored by Eric Dieckman's avatar Eric Dieckman
Browse files

Remove client pieces

parent 4f2b415d
Loading
Loading
Loading
Loading
+0 −79
Original line number Diff line number Diff line
using UW.Shibboleth;

namespace Cals.Visor.Api.Authorization;

public class AuthenticationExtensions
{
    /// <summary>
    /// Generates an list of user-defined attributes to mock a Shibboleth session for the specified username.
    /// </summary>
    /// <param name="username">Username of user to impersonate - valid values: ewdieckman, eewall, mtreleven, sjohnston3.</param>
    /// <returns></returns>
    public static ShibbolethAttributeValueCollection GenerateAppDevAttributes(string username)
    {
        // setup a dictionary with the various users setup
        var authDictionary = new Dictionary<string, ShibbolethAttributeValueCollection>
        {
            // ewdieckman - SysAdmin
            {
                "ewdieckman",
                new ShibbolethAttributeValueCollection()
                {
                    new ShibbolethAttributeValue("uid", "ewdieckman"),
                    new ShibbolethAttributeValue("givenName", "Eric"),
                    new ShibbolethAttributeValue("sn", "Dieckman"),
                    new ShibbolethAttributeValue("mail", "eric.dieckman@wisc.edu"),
                    new ShibbolethAttributeValue("wiscEduPVI", "UW106Z480"),
                    new ShibbolethAttributeValue("isMemberOf", "uw:domain:cals.wisc.edu:it:sysadmin;uw:domain:cals.wisc.edu:administrativestaff"),
                }
            },

            // eewall - HR
            {
                "eewall",
                new ShibbolethAttributeValueCollection()
                {
                    new ShibbolethAttributeValue("uid", "eewall"),
                    new ShibbolethAttributeValue("givenName", "Erin"),
                    new ShibbolethAttributeValue("sn", "Wall"),
                    new ShibbolethAttributeValue("mail", "erin.wall@wisc.edu"),
                    new ShibbolethAttributeValue("wiscEduPVI", "UW834D494"),
                    new ShibbolethAttributeValue("isMemberOf", "uw:domain:cals.wisc.edu:apps:graft:hr"),
                }
            },

            // mtreleven - Academic Programs
            {
                "mtreleven",
                new ShibbolethAttributeValueCollection()
                {
                    new ShibbolethAttributeValue("uid", "mtreleven"),
                    new ShibbolethAttributeValue("givenName", "Mary"),
                    new ShibbolethAttributeValue("sn", "Treleven"),
                    new ShibbolethAttributeValue("mail", "mtreleven@wisc.edu"),
                    new ShibbolethAttributeValue("wiscEduPVI", "UW965Q131"),
                    new ShibbolethAttributeValue("isMemberOf", "uw:domain:cals.wisc.edu:administrativestaff;uw:domain:cals.wisc.edu:apps:graft:academic-programs"),
                }
            },

            // sjohnston3 - general users
            {
                "sjohnston3",
                new ShibbolethAttributeValueCollection()
                {
                    new ShibbolethAttributeValue("uid", "sjohnston3"),
                    new ShibbolethAttributeValue("givenName", "Sarah"),
                    new ShibbolethAttributeValue("sn", "Johnston"),
                    new ShibbolethAttributeValue("mail", "sarah.johnston@wisc.edu"),
                    new ShibbolethAttributeValue("wiscEduPVI", "UW525C550"),
                }
            },
        };

        // check for the specified user
        if (!authDictionary.TryGetValue(username, out ShibbolethAttributeValueCollection? attributes))
            throw new Exception($"{username} is not a valid dev authentication name");

        return attributes;
    }
}

src/api/ClientApp/.editorconfig

deleted100644 → 0
+0 −7
Original line number Diff line number Diff line
[*.{js,jsx,mjs,cjs,ts,tsx,mts,cts,vue,html}]
charset = utf-8
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

src/api/ClientApp/.eslintrc.cjs

deleted100644 → 0
+0 −14
Original line number Diff line number Diff line
/* eslint-env node */
require('@rushstack/eslint-patch/modern-module-resolution')

module.exports = {
  root: true,
  'extends': [
    'plugin:vue/vue3-essential',
    'eslint:recommended',
    '@vue/eslint-config-typescript'
  ],
  parserOptions: {
    ecmaVersion: 'latest'
  }
}

src/api/ClientApp/.gitattributes

deleted100644 → 0
+0 −63
Original line number Diff line number Diff line
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto

###############################################################################
# Set default behavior for command prompt diff.
#
# This is need for earlier builds of msysgit that does not have it on by
# default for csharp files.
# Note: This is only used by command line
###############################################################################
#*.cs     diff=csharp

###############################################################################
# Set the merge driver for project and solution files
#
# Merging from the command prompt will add diff markers to the files if there
# are conflicts (Merging from VS is not affected by the settings below, in VS
# the diff markers are never inserted). Diff markers may cause the following 
# file extensions to fail to load in VS. An alternative would be to treat
# these files as binary and thus will always conflict and require user
# intervention with every merge. To do so, just uncomment the entries below
###############################################################################
#*.sln       merge=binary
#*.csproj    merge=binary
#*.vbproj    merge=binary
#*.vcxproj   merge=binary
#*.vcproj    merge=binary
#*.dbproj    merge=binary
#*.fsproj    merge=binary
#*.lsproj    merge=binary
#*.wixproj   merge=binary
#*.modelproj merge=binary
#*.sqlproj   merge=binary
#*.wwaproj   merge=binary

###############################################################################
# behavior for image files
#
# image files are treated as binary by default.
###############################################################################
#*.jpg   binary
#*.png   binary
#*.gif   binary

###############################################################################
# diff behavior for common document formats
# 
# Convert binary document formats to text before diffing them. This feature
# is only available from the command line. Turn it on by uncommenting the 
# entries below.
###############################################################################
#*.doc   diff=astextplain
#*.DOC   diff=astextplain
#*.docx  diff=astextplain
#*.DOCX  diff=astextplain
#*.dot   diff=astextplain
#*.DOT   diff=astextplain
#*.pdf   diff=astextplain
#*.PDF   diff=astextplain
#*.rtf   diff=astextplain
#*.RTF   diff=astextplain

src/api/ClientApp/.gitignore

deleted100644 → 0
+0 −30
Original line number Diff line number Diff line
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
.DS_Store
dist
dist-ssr
coverage
*.local

/cypress/videos/
/cypress/screenshots/

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

*.tsbuildinfo
Loading