Skip to content
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

- Release v4.0.0 #10

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
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
26 changes: 13 additions & 13 deletions .github/workflows/CI-Build.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: CI
'on':
pull_request:
types: [opened, reopened, edited, synchronize]
types: [ opened, reopened, edited, synchronize ]
paths-ignore:
- "**/*.md"
- "**/*.gitignore"
- "**/*.gitattributes"
- "**/*.md"
- "**/*.gitignore"
- "**/*.gitattributes"
jobs:
Run-Lint:
runs-on: ubuntu-latest
Expand All @@ -21,7 +21,7 @@ jobs:
env:
VALIDATE_ALL_CODEBASE: false
FILTER_REGEX_INCLUDE: .*src/.*
FILTER_REGEX_EXCLUDE: .*xsds/.*
FILTER_REGEX_EXCLUDE: .*xsds/.*
DEFAULT_BRANCH: master
GITHUB_TOKEN: '${{ env.github-token }}'
Build-Beta:
Expand Down Expand Up @@ -53,7 +53,7 @@ jobs:
- name: Step-04 Install .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
dotnet-version: 9.0.x

- name: Step-05 Restore dependencies
run: dotnet restore
Expand All @@ -62,7 +62,7 @@ jobs:
- name: Step-06 Build Beta Version
run: dotnet build --configuration Release --no-restore -p:PackageVersion=${{ steps.gitversion.outputs.nuGetVersion }}
working-directory: '${{ env.working-directory }}'

- name: Step-07 Test Solution
run: dotnet test --configuration Release --no-build --no-restore --verbosity normal
working-directory: '${{ env.working-directory }}'
Expand Down Expand Up @@ -102,14 +102,14 @@ jobs:
- name: Step-04 Install .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
dotnet-version: 9.0.x

- name: Step-05 Restore dependencies
run: dotnet restore
working-directory: '${{ env.working-directory }}'

- name: Step-06 Build Release Version
if: ('startsWith(github.ref, ''refs/heads/release'')')
if: ('startsWith(github.ref, ''refs/heads/release'')')
run: dotnet build --configuration Release --no-restore -p:PackageVersion=${{ steps.gitversion.outputs.MajorMinorPatch }}
working-directory: '${{ env.working-directory }}'

Expand All @@ -124,9 +124,9 @@ jobs:
path: ${{env.working-directory}}
retention-days: 1
Package-Artifacts:
needs: [Build-Beta, Build-Release]
needs: [ Build-Beta, Build-Release ]
if: |
always() &&
always() &&
(needs.Build-Beta.result == 'success' || needs.Build-Release.result == 'success')
runs-on: ubuntu-latest
outputs:
Expand All @@ -140,14 +140,14 @@ jobs:
with:
name: build-artifact
path: ${{env.working-directory}}

- name: Step-02 Install Github Packages
run: dotnet tool install gpr --global

- name: Step-03 Publish to Github Packages
run: find -name "*.nupkg" -print -exec gpr push -k ${{env.github-token}} {} \;
Release:
needs: [Package-Artifacts]
needs: [ Package-Artifacts ]
if: |
success('Package-Artifacts') &&
${{ startsWith(github.head_ref, 'release/') }}
Expand Down
62 changes: 31 additions & 31 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ name: "CodeQL"

on:
pull_request:
types: [opened, reopened, edited, synchronize]
types: [ opened, reopened, edited, synchronize ]
paths-ignore:
- "**/*.md"
- "**/*.gitignore"
- "**/*.gitattributes"
- "**/*.md"
- "**/*.gitignore"
- "**/*.gitattributes"
schedule:
- cron: '35 15 * * 2'

Expand All @@ -38,38 +38,38 @@ jobs:
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Checkout repository
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality


# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh
# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{matrix.language}}"
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{matrix.language}}"
4 changes: 2 additions & 2 deletions GitVersion.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
next-version: 3.0.0
next-version: 4.0.0
tag-prefix: '[vV]'
mode: ContinuousDeployment
branches:
Expand All @@ -12,4 +12,4 @@ branches:
pull-request:
tag: beta
ignore:
sha: []
sha: [ ]
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2024 Tech Ninja Labs
Copyright (c) 2024 Code Shayk

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# <img src="https://github.com/NinjaRocks/Secure.SAML/blob/master/ninja-icon-16.png" alt="ninja" style="width:30px;"/> Secure.SAML v3.0.0
[![NuGet version](https://badge.fury.io/nu/Secure.SAML.svg)](https://badge.fury.io/nu/Secure.SAML) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/NinjaRocks/Secure.SAML/blob/master/License.md) [![CI](https://github.com/NinjaRocks/Secure.SAML/actions/workflows/CI-Build.yml/badge.svg)](https://github.com/NinjaRocks/Secure.SAML/actions/workflows/CI-Build.yml) [![GitHub Release](https://img.shields.io/github/v/release/ninjarocks/Secure.SAML?logo=github&sort=semver)](https://github.com/ninjarocks/Secure.SAML/releases/latest)
[![CodeQL](https://github.com/NinjaRocks/Secure.SAML/actions/workflows/codeql.yml/badge.svg)](https://github.com/NinjaRocks/Secure.SAML/actions/workflows/codeql.yml) [![.Net](https://img.shields.io/badge/.Net-8.0-blue)](https://dotnet.microsoft.com/en-us/download/dotnet/8)
# <img src="https://github.com/CodeShayk/Secure.SAML/blob/master/ninja-icon-16.png" alt="ninja" style="width:30px;"/> Secure.SAML v4.0.0

[![NuGet version](https://badge.fury.io/nu/Secure.SAML.svg)](https://badge.fury.io/nu/Secure.SAML) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/CodeShayk/Secure.SAML/blob/master/License.md) [![CI](https://github.com/CodeShayk/Secure.SAML/actions/workflows/CI-Build.yml/badge.svg)](https://github.com/CodeShayk/Secure.SAML/actions/workflows/CI-Build.yml) [![GitHub Release](https://img.shields.io/github/v/release/CodeShayk/Secure.SAML?logo=github&sort=semver)](https://github.com/CodeShayk/Secure.SAML/releases/latest)
[![CodeQL](https://github.com/CodeShayk/Secure.SAML/actions/workflows/codeql.yml/badge.svg)](https://github.com/CodeShayk/Secure.SAML/actions/workflows/codeql.yml) [![.Net](https://img.shields.io/badge/.Net-9.0-blue)](https://dotnet.microsoft.com/en-us/download/dotnet/9)

.Net library to generate signed SAML 2.0 Response for parameters below-

Expand Down Expand Up @@ -34,10 +35,11 @@ var parameters = new Parameters
Timestamp = DateTime.Parse("2018-02-27T09:36:44.0665619Z") // Optional, defaults to DateTime.UtcNow
};

var xmlDocument = saml.Create(parameters); // Returns XMLDocument with Signed SAML.
var xmlDocument = saml.Create(parameters); // Returns XMLDocument with Signed SAML.
var base64EncodedString = saml.CreateEncoded(parameters); // Returns Base64 encoded string for Signed SAML.

```

Example IoC Registration

```
Expand Down
4 changes: 2 additions & 2 deletions nuget.config
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear />
<add key="nuget_org" value="https://api.nuget.org/v3/index.json" />
<clear/>
<add key="nuget_org" value="https://api.nuget.org/v3/index.json"/>
</packageSources>
</configuration>
10 changes: 5 additions & 5 deletions src/Secure.SAML/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
using System;
using System.Reflection;

[assembly: System.Reflection.AssemblyCompanyAttribute("Tech Ninja Labs")]
[assembly: System.Reflection.AssemblyCompanyAttribute("Code Shayk")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Release")]
[assembly: System.Reflection.AssemblyCopyrightAttribute("2024")]
[assembly: System.Reflection.AssemblyDescriptionAttribute(".Net library to generate signed SAML 2.0 Response.")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("3.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("3.0.0")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("4.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("4.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("Secure.SAML")]
[assembly: System.Reflection.AssemblyTitleAttribute("Secure.SAML")]
[assembly: System.Reflection.AssemblyVersionAttribute("3.0.0")]
[assembly: System.Reflection.AssemblyMetadataAttribute("RepositoryUrl", "https://github.com/TechNinjaLabs/Secure.SAML")]
[assembly: System.Reflection.AssemblyVersionAttribute("4.0.0")]
[assembly: System.Reflection.AssemblyMetadataAttribute("RepositoryUrl", "https://github.com/Codeshayk/Secure.SAML")]
// Generated by the MSBuild WriteCodeFragment class.

17 changes: 8 additions & 9 deletions src/Secure.SAML/NameIdFormat.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
namespace Secure.SAML
namespace Secure.SAML;

public enum NameIdFormat

Check warning on line 3 in src/Secure.SAML/NameIdFormat.cs

View workflow job for this annotation

GitHub Actions / Build-Release

Missing XML comment for publicly visible type or member 'NameIdFormat'
{
public enum NameIdFormat
{
None,
Unspecified,
Transient,
EmailAddress,
Persistent
}
None,

Check warning on line 5 in src/Secure.SAML/NameIdFormat.cs

View workflow job for this annotation

GitHub Actions / Build-Release

Missing XML comment for publicly visible type or member 'NameIdFormat.None'
Unspecified,

Check warning on line 6 in src/Secure.SAML/NameIdFormat.cs

View workflow job for this annotation

GitHub Actions / Build-Release

Missing XML comment for publicly visible type or member 'NameIdFormat.Unspecified'
Transient,

Check warning on line 7 in src/Secure.SAML/NameIdFormat.cs

View workflow job for this annotation

GitHub Actions / Build-Release

Missing XML comment for publicly visible type or member 'NameIdFormat.Transient'
EmailAddress,

Check warning on line 8 in src/Secure.SAML/NameIdFormat.cs

View workflow job for this annotation

GitHub Actions / Build-Release

Missing XML comment for publicly visible type or member 'NameIdFormat.EmailAddress'
Persistent

Check warning on line 9 in src/Secure.SAML/NameIdFormat.cs

View workflow job for this annotation

GitHub Actions / Build-Release

Missing XML comment for publicly visible type or member 'NameIdFormat.Persistent'
}
Loading
Loading